<?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=Fht14</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=Fht14"/>
	<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/wiki/Special:Contributions/Fht14"/>
	<updated>2026-04-07T17:28:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695972</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695972"/>
		<updated>2018-03-28T10:14:57Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Radial Distribution Function for Differing Phases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
Felix Henry Thompson – 00930702 – 28&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; March 2018&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate that Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to be made using calculations taking less than five minutes to complete. This work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Molecular Dynamics was first conceptually described in the 1950s, not seeing general use until the mid-1970s.[1] As a technique, it sought to confront the age-old difficulty of solving the N-body problem &amp;amp;mdash; how could one evaluate how a large system of bodies develops through time? It was the advent of accessible computing which provided the work-power needed to resolve this problem. With modern personal computing power, as well as access to specialised computing facilities, systems containing thousands of bodies can be evaluated, with results being presented in seconds and minutes, rather than weeks and months.[2]&lt;br /&gt;
&lt;br /&gt;
Originally Molecular Dynamics was only being applied to small, well-defined, near-theoretical, systems such as perfect hard-spheres, or point-masses with simplistic interparticle interactions. In stark contrast to this, MD nowadays sees major applications to the dynamics of proteins and other biological systems.[3] Compared to the original systems, these new ones are full of complex degrees of freedom, huge varieties of interparticle forces, variable responses to potentials, and potentially involving proteins kDa&#039;s in size. This area is of great interest, due to the dynamics of proteins underpinning their biological action. As such, competent understanding of them may allow the directing of new medicines and pharmaceutical techniques.[4]&lt;br /&gt;
&lt;br /&gt;
The basic structure of Molecular Dynamics is fairly simplistic in principle &amp;amp;mdash; we evaluate the force on each particle in our system (often neglecting the majority of pair interactions), use that to determine the acceleration, propagate the particles some small distance in time, update the new positions and velocities, and then repeat as needed. There are a wide variety of methodologies that allow one to put this process into practice. The simulations in this work follow the Velocity&amp;amp;ndash;Verlet algorithm, explanations of which can be found [2,5].&lt;br /&gt;
&lt;br /&gt;
The forces between particles in your system define the properties that system will have. In this work the Lennard-Jones potential is used, defined in Eq. 1.[6] As such we are modeling the Lennard-Jones fluid, the phase diagram of which is also provided in Fig. 1.[2,7,8] Throughout this work, it is our goal to navigate the thermodynamic properties of this system using the tools of Molecular Dynamics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 1: &amp;lt;math&amp;gt; \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:20180326 145146.svg|600 px|thumb|centre|Fig. 1 &amp;amp;ndash; The phase diagram of the Lennard-Jones fluid]]&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS.[9] VMD was also used in visualising and analysing the results of said calculations.[10] All further analysis was performed utilising the Python programming language, with project code provided where relevant.[11] All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3 or 3.2&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise, all reported values are in Lennard-Jones reduced units.&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here([[Media:FHT140.001.in|here]]), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures 1.0, 2.0, 2.6, 3.0, 4.0. Temperatures were set from 1 to 3.5. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here ([[Media:FHT14NPT_P2x6T1x5.in|here]]), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. 2. These simulations were performed for the densities 0.2, 0.5, 0.8 the temperature range 1.0&amp;amp;ndash;4.0. An example input file is provided here ([[Media:FHT14CVT_L0x8T2x0.in|here]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 2: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD, the trajectories were then visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid[2,7,8], the behaviors in differing phases was analysed. An example input file is provided here ([[Media:FHT14D0x8T1x2.in|here]]), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement was determined for a subsequent 5000 steps. An example input file is provided here ([[Media:FHT14D_D0x8T1x2.in|here]]), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this, five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. 2 &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. 2 it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. 3&amp;amp;ndash;5 shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 1 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. 3 &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. 4 &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. 5 &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. 6. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. 6 &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. 6 are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. 7. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. 7 &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. 2, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. 8 below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. 8 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. 8 by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. 9 shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. 1, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. 9 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. 10.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. 10 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give system in the solid, liquid, and vapour phases. The trajectories of these systems were measured, and passed to VMD to allow calculation of the Radial Distribution Fuction g(r) for each system. The integrals of this function were also calculated. The RDF for each phase is given in Figs. 11&amp;amp;ndash;13.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 2 &amp;amp;ndash; Radial Distribution Function for solid/liquid/vapour&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_rdf.PNG|600 px|thumb|centre|Fig. 11 &amp;amp;ndash; RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_rdf.PNG|600 px|thumb|centre|Fig. 12 &amp;amp;ndash; RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_rdf.PNG|600 px|thumb|centre|Fig. 13 &amp;amp;ndash; RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid is complex, yet well structured. Here each peak corresponds to a lattice point some distance away from another point. The first three peaks are at reduced distances of 1.025, 1.475, and 1.825. Therefore for the argon system these distances correspond to 349, 502, and 620 pm. An experimentally determined lattice parameter for the argon crystal is a=525.6 pm.[12] This gives rise to the first three nearest lattice points being &amp;lt;math&amp;gt;\sqrt{2*525.6^2},\ 525.6,\ (525.6^2 + 2(0.5*525.6)^2)^{1/3}&amp;lt;/math&amp;gt;, equal to 372, 526, and 643 pm. These values are approximately equal, varying by ca. 20 pm, demonstrating that the lattice spacings can be approximately determined by evaluating the RDF.&lt;br /&gt;
&lt;br /&gt;
The RDFs for the liquid and vapour phases are similar, they both have a peak at approximately 1&amp;amp;sigma;, they oscillate with a period of 1&amp;amp;sigma;, with the gas RDF decaying much faster. This is explained by the high density of a liquid, meaning that a large number of particles are found within a few &amp;amp;sigma; of each other, whereas a gas is diffuse and therefore has few nearby particles. The peak around 1&amp;amp;sigma; for the gas is explained by the fact that when two gas particles collide, they decelerate before beginning to move away from each other. This results in colliding particles spending a significant amount of time about 1&amp;amp;sigma; apart, giving rise to the aforementioned peak.&lt;br /&gt;
&lt;br /&gt;
The integrals of the RDFs are also included for the three phases as Figs. 14&amp;amp;ndash;16. Here the number integral is given from 0&amp;amp;ndash;7&amp;amp;sigma;. The graphs for the solid and gas appear as expected &amp;amp;mdash; an exponential increase in number integral over distance. The integrals show that the more atoms are present within 10&amp;amp;sigma; for the solid than within the gas, about 5100 &#039;&#039;vs&#039;&#039; 1750. This is just down to the higher density of the solid. The graph for the liquid is more complex, it begins by increasing exponentially, but then begins to tail off after approximately 8&amp;amp;sigma;. This can be explained by a finite size error &amp;amp;mdash; the sphere it is integrating over begins to extend past the walls of the simulation volume, which is approximately 16&amp;amp;sigma; side-to-side&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 3 &amp;amp;ndash; Integral of Radial Distribution Function for solid/liquid/vapour&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_int.PNG|600 px|thumb|centre|Fig. 14 &amp;amp;ndash; Integral of RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_int.PNG|600 px|thumb|centre|Fig. 15 &amp;amp;ndash; Integral of RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_int.PNG|600 px|thumb|centre|Fig. 16 &amp;amp;ndash; Integral of RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase, the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. 17, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. 17 &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. 18&amp;amp;ndash;19.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. 18 &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. 19 &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
:[1] &amp;amp;ndash; B.J. Alder and T.E. Wainwright, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1959, &#039;&#039;&#039;31&#039;&#039;&#039;&lt;br /&gt;
:[2] &amp;amp;ndash; J.M. Haile, &#039;&#039;Molecular Dynamics Simulation: Elementary Methods&#039;&#039;, John Wiley &amp;amp; Sons, Inc., New York, 1997&lt;br /&gt;
:[3] &amp;amp;ndash; A. Hospital, J.R. Goni, M. Orozco, and J.L. Gelpi, &#039;&#039;Adv. App. Bioinf. Chem.&#039;&#039;, 2015, &#039;&#039;&#039;8&#039;&#039;&#039;, 37&amp;amp;ndash;47 &lt;br /&gt;
:[4] &amp;amp;ndash; L. Yang, P. Sang, Y. Tao, Y. Fu, K. Zhang, Y. Xie, and S. Lie, &#039;&#039;J. Biomol. Struct. Dyn.&#039;&#039;, 2014, &#039;&#039;&#039;32&#039;&#039;&#039;, 372&amp;amp;ndash;393&lt;br /&gt;
:[5] &amp;amp;ndash; W.C. Swope, H.C. Andersen, P.H. Berens, and K.R. Wilson, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1982, &#039;&#039;&#039;76&#039;&#039;&#039;, 637&amp;amp;ndash;649&lt;br /&gt;
:[6] &amp;amp;ndash; M.P Allen, &#039;&#039;Compuational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes&#039;&#039;, N. Attig, K. Binder, H. Grubmuller, and K. Kremer (Ed), 2004, pp.1&amp;amp;ndash;28, 3-00-012641-4&lt;br /&gt;
:[7] &amp;amp;ndash; J.J. Nicolas, K.E. Gubbins, W.B. Streett, and D.J. Tildesley, &#039;&#039;Mol. Phys.&#039;&#039;, 1967, &#039;&#039;&#039;37&#039;&#039;&#039;&lt;br /&gt;
:[8] &amp;amp;ndash; J.P. Hansen, and I.R. McDonald, &#039;&#039;Theory of Simple Liquids&#039;&#039;, 1st Ed, Academic, London, 1976  &lt;br /&gt;
:[9] &amp;amp;ndash; S. Plimpton, &#039;&#039;J. Comp. Phys.&#039;&#039;, 1995, &#039;&#039;&#039;117&#039;&#039;&#039;, 1&amp;amp;ndash;19&lt;br /&gt;
:[10] &amp;amp;ndash; W. Humphrey, A. Dalke, K. Schulten, &#039;&#039;J. Molec. Graphics&#039;&#039;, 1996, &#039;&#039;&#039;14&#039;&#039;&#039;, 33&amp;amp;ndash;38&lt;br /&gt;
:[11] &amp;amp;ndash; Python Software Foundation, Python Language Reference, version 3.0. Available at http://www.python.org&lt;br /&gt;
:[12] &amp;amp;ndash; D. G. Henshaw, &#039;&#039;Phys. Rev.&#039;&#039;, 1958, &#039;&#039;&#039;111&#039;&#039;&#039;, 1470&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
:[[Media:FHT140.001.in|Intro example input]]&lt;br /&gt;
:[[Media:FHT14NPT_P2x6T1x5.in|NpT example input]]&lt;br /&gt;
:[[Media:FHT14CVT_L0x8T2x0.in|Cv example input]]&lt;br /&gt;
:[[Media:FHT14D0x8T1x2.in|RDF example input]]&lt;br /&gt;
:[[Media:FHT14D_D0x8T1x2.in|Diffusivity example input]]&lt;br /&gt;
:[[Media:FHT14HO.xls|Ho.xls showing working]]&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file ([[Media:FHT14HO.xls|here]]).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig. 20, alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 4 &amp;amp;ndash; Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. 20 &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. 21 &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. For a time-step of 0.55 it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. 3), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. The total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1 changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 3 &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695971</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695971"/>
		<updated>2018-03-28T10:13:15Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
Felix Henry Thompson – 00930702 – 28&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; March 2018&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate that Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to be made using calculations taking less than five minutes to complete. This work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Molecular Dynamics was first conceptually described in the 1950s, not seeing general use until the mid-1970s.[1] As a technique, it sought to confront the age-old difficulty of solving the N-body problem &amp;amp;mdash; how could one evaluate how a large system of bodies develops through time? It was the advent of accessible computing which provided the work-power needed to resolve this problem. With modern personal computing power, as well as access to specialised computing facilities, systems containing thousands of bodies can be evaluated, with results being presented in seconds and minutes, rather than weeks and months.[2]&lt;br /&gt;
&lt;br /&gt;
Originally Molecular Dynamics was only being applied to small, well-defined, near-theoretical, systems such as perfect hard-spheres, or point-masses with simplistic interparticle interactions. In stark contrast to this, MD nowadays sees major applications to the dynamics of proteins and other biological systems.[3] Compared to the original systems, these new ones are full of complex degrees of freedom, huge varieties of interparticle forces, variable responses to potentials, and potentially involving proteins kDa&#039;s in size. This area is of great interest, due to the dynamics of proteins underpinning their biological action. As such, competent understanding of them may allow the directing of new medicines and pharmaceutical techniques.[4]&lt;br /&gt;
&lt;br /&gt;
The basic structure of Molecular Dynamics is fairly simplistic in principle &amp;amp;mdash; we evaluate the force on each particle in our system (often neglecting the majority of pair interactions), use that to determine the acceleration, propagate the particles some small distance in time, update the new positions and velocities, and then repeat as needed. There are a wide variety of methodologies that allow one to put this process into practice. The simulations in this work follow the Velocity&amp;amp;ndash;Verlet algorithm, explanations of which can be found [2,5].&lt;br /&gt;
&lt;br /&gt;
The forces between particles in your system define the properties that system will have. In this work the Lennard-Jones potential is used, defined in Eq. 1.[6] As such we are modeling the Lennard-Jones fluid, the phase diagram of which is also provided in Fig. 1.[2,7,8] Throughout this work, it is our goal to navigate the thermodynamic properties of this system using the tools of Molecular Dynamics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 1: &amp;lt;math&amp;gt; \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:20180326 145146.svg|600 px|thumb|centre|Fig. 1 &amp;amp;ndash; The phase diagram of the Lennard-Jones fluid]]&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS.[9] VMD was also used in visualising and analysing the results of said calculations.[10] All further analysis was performed utilising the Python programming language, with project code provided where relevant.[11] All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3 or 3.2&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise, all reported values are in Lennard-Jones reduced units.&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here([[Media:FHT140.001.in|here]]), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures 1.0, 2.0, 2.6, 3.0, 4.0. Temperatures were set from 1 to 3.5. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here ([[Media:FHT14NPT_P2x6T1x5.in|here]]), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. 2. These simulations were performed for the densities 0.2, 0.5, 0.8 the temperature range 1.0&amp;amp;ndash;4.0. An example input file is provided here ([[Media:FHT14CVT_L0x8T2x0.in|here]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 2: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD, the trajectories were then visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid[2,7,8], the behaviors in differing phases was analysed. An example input file is provided here ([[Media:FHT14D0x8T1x2.in|here]]), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement was determined for a subsequent 5000 steps. An example input file is provided here ([[Media:FHT14D_D0x8T1x2.in|here]]), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this, five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. 2 &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. 2 it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. 3&amp;amp;ndash;5 shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 1 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. 3 &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. 4 &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. 5 &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. 6. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. 6 &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. 6 are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. 7. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. 7 &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. 2, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. 8 below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. 8 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. 8 by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. 9 shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. 1, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. 9 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. 10.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. 10 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give system in the solid, liquid, and vapour phases. The trajectories of these systems were measured, and passed to VMD to allow calculation of the Radial Distribution Fuction g(r) for each system. The integrals of this function were also calculated. The RDF for each phase is given in Figs. 11&amp;amp;ndash;13.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 2 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_rdf.PNG|600 px|thumb|centre|Fig. 11 &amp;amp;ndash; RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_rdf.PNG|600 px|thumb|centre|Fig. 12 &amp;amp;ndash; RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_rdf.PNG|600 px|thumb|centre|Fig. 13 &amp;amp;ndash; RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid is complex, yet well structured. Here each peak corresponds to a lattice point some distance away from another point. The first three peaks are at reduced distances of 1.025, 1.475, and 1.825. Therefore for the argon system these distances correspond to 349, 502, and 620 pm. An experimentally determined lattice parameter for the argon crystal is a=525.6 pm.[12] This gives rise to the first three nearest lattice points being &amp;lt;math&amp;gt;\sqrt{2*525.6^2},\ 525.6,\ (525.6^2 + 2(0.5*525.6)^2)^{1/3}&amp;lt;/math&amp;gt;, equal to 372, 526, and 643 pm. These values are approximately equal, varying by ca. 20 pm, demonstrating that the lattice spacings can be approximately determined by evaluating the RDF.&lt;br /&gt;
&lt;br /&gt;
The RDFs for the liquid and vapour phases are similar, they both have a peak at approximately 1&amp;amp;sigma;, they oscillate with a period of 1&amp;amp;sigma;, with the gas RDF decaying much faster. This is explained by the high density of a liquid, meaning that a large number of particles are found within a few &amp;amp;sigma; of each other, whereas a gas is diffuse and therefore has few nearby particles. The peak around 1&amp;amp;sigma; for the gas is explained by the fact that when two gas particles collide, they decelerate before beginning to move away from each other. This results in colliding particles spending a significant amount of time about 1&amp;amp;sigma; apart, giving rise to the aforementioned peak.&lt;br /&gt;
&lt;br /&gt;
The integrals of the RDFs are also included for the three phases as Figs. 14&amp;amp;ndash;16. Here the number integral is given from 0&amp;amp;ndash;7&amp;amp;sigma;. The graphs for the solid and gas appear as expected &amp;amp;mdash; an exponential increase in number integral over distance. The integrals show that the more atoms are present within 10&amp;amp;sigma; for the solid than within the gas, about 5100 &#039;&#039;vs&#039;&#039; 1750. This is just down to the higher density of the solid. The graph for the liquid is more complex, it begins by increasing exponentially, but then begins to tail off after approximately 8&amp;amp;sigma;. This can be explained by a finite size error &amp;amp;mdash; the sphere it is integrating over begins to extend past the walls of the simulation volume, which is approximately 16&amp;amp;sigma; side-to-side&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 3 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_int.PNG|600 px|thumb|centre|Fig. 14 &amp;amp;ndash; Integral of RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_int.PNG|600 px|thumb|centre|Fig. 15 &amp;amp;ndash; Integral of RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_int.PNG|600 px|thumb|centre|Fig. 16 &amp;amp;ndash; Integral of RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase, the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. 17, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. 17 &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. 18&amp;amp;ndash;19.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. 18 &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. 19 &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
:[1] &amp;amp;ndash; B.J. Alder and T.E. Wainwright, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1959, &#039;&#039;&#039;31&#039;&#039;&#039;&lt;br /&gt;
:[2] &amp;amp;ndash; J.M. Haile, &#039;&#039;Molecular Dynamics Simulation: Elementary Methods&#039;&#039;, John Wiley &amp;amp; Sons, Inc., New York, 1997&lt;br /&gt;
:[3] &amp;amp;ndash; A. Hospital, J.R. Goni, M. Orozco, and J.L. Gelpi, &#039;&#039;Adv. App. Bioinf. Chem.&#039;&#039;, 2015, &#039;&#039;&#039;8&#039;&#039;&#039;, 37&amp;amp;ndash;47 &lt;br /&gt;
:[4] &amp;amp;ndash; L. Yang, P. Sang, Y. Tao, Y. Fu, K. Zhang, Y. Xie, and S. Lie, &#039;&#039;J. Biomol. Struct. Dyn.&#039;&#039;, 2014, &#039;&#039;&#039;32&#039;&#039;&#039;, 372&amp;amp;ndash;393&lt;br /&gt;
:[5] &amp;amp;ndash; W.C. Swope, H.C. Andersen, P.H. Berens, and K.R. Wilson, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1982, &#039;&#039;&#039;76&#039;&#039;&#039;, 637&amp;amp;ndash;649&lt;br /&gt;
:[6] &amp;amp;ndash; M.P Allen, &#039;&#039;Compuational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes&#039;&#039;, N. Attig, K. Binder, H. Grubmuller, and K. Kremer (Ed), 2004, pp.1&amp;amp;ndash;28, 3-00-012641-4&lt;br /&gt;
:[7] &amp;amp;ndash; J.J. Nicolas, K.E. Gubbins, W.B. Streett, and D.J. Tildesley, &#039;&#039;Mol. Phys.&#039;&#039;, 1967, &#039;&#039;&#039;37&#039;&#039;&#039;&lt;br /&gt;
:[8] &amp;amp;ndash; J.P. Hansen, and I.R. McDonald, &#039;&#039;Theory of Simple Liquids&#039;&#039;, 1st Ed, Academic, London, 1976  &lt;br /&gt;
:[9] &amp;amp;ndash; S. Plimpton, &#039;&#039;J. Comp. Phys.&#039;&#039;, 1995, &#039;&#039;&#039;117&#039;&#039;&#039;, 1&amp;amp;ndash;19&lt;br /&gt;
:[10] &amp;amp;ndash; W. Humphrey, A. Dalke, K. Schulten, &#039;&#039;J. Molec. Graphics&#039;&#039;, 1996, &#039;&#039;&#039;14&#039;&#039;&#039;, 33&amp;amp;ndash;38&lt;br /&gt;
:[11] &amp;amp;ndash; Python Software Foundation, Python Language Reference, version 3.0. Available at http://www.python.org&lt;br /&gt;
:[12] &amp;amp;ndash; D. G. Henshaw, &#039;&#039;Phys. Rev.&#039;&#039;, 1958, &#039;&#039;&#039;111&#039;&#039;&#039;, 1470&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
:[[Media:FHT140.001.in|Intro example input]]&lt;br /&gt;
:[[Media:FHT14NPT_P2x6T1x5.in|NpT example input]]&lt;br /&gt;
:[[Media:FHT14CVT_L0x8T2x0.in|Cv example input]]&lt;br /&gt;
:[[Media:FHT14D0x8T1x2.in|RDF example input]]&lt;br /&gt;
:[[Media:FHT14D_D0x8T1x2.in|Diffusivity example input]]&lt;br /&gt;
:[[Media:FHT14HO.xls|Ho.xls showing working]]&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file ([[Media:FHT14HO.xls|here]]).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig. 20, alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 4 &amp;amp;ndash; Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. 20 &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. 21 &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. For a time-step of 0.55 it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. 3), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. The total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1 changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 3 &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14D_D0x8T1x2.in&amp;diff=695970</id>
		<title>File:FHT14D D0x8T1x2.in</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14D_D0x8T1x2.in&amp;diff=695970"/>
		<updated>2018-03-28T10:12:33Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14D0x8T1x2.in&amp;diff=695969</id>
		<title>File:FHT14D0x8T1x2.in</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14D0x8T1x2.in&amp;diff=695969"/>
		<updated>2018-03-28T10:11:52Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14CVT_L0x8T2x0.in&amp;diff=695966</id>
		<title>File:FHT14CVT L0x8T2x0.in</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14CVT_L0x8T2x0.in&amp;diff=695966"/>
		<updated>2018-03-28T10:10:51Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14NPT_P2x6T1x5.in&amp;diff=695964</id>
		<title>File:FHT14NPT P2x6T1x5.in</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14NPT_P2x6T1x5.in&amp;diff=695964"/>
		<updated>2018-03-28T10:09:48Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT140.001.in&amp;diff=695960</id>
		<title>File:FHT140.001.in</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT140.001.in&amp;diff=695960"/>
		<updated>2018-03-28T10:08:08Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695958</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695958"/>
		<updated>2018-03-28T10:06:46Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
Felix Henry Thompson – 00930702 – 28&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; March 2018&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate that Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to be made using calculations taking less than five minutes to complete. This work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Molecular Dynamics was first conceptually described in the 1950s, not seeing general use until the mid-1970s.[1] As a technique, it sought to confront the age-old difficulty of solving the N-body problem &amp;amp;mdash; how could one evaluate how a large system of bodies develops through time? It was the advent of accessible computing which provided the work-power needed to resolve this problem. With modern personal computing power, as well as access to specialised computing facilities, systems containing thousands of bodies can be evaluated, with results being presented in seconds and minutes, rather than weeks and months.[2]&lt;br /&gt;
&lt;br /&gt;
Originally Molecular Dynamics was only being applied to small, well-defined, near-theoretical, systems such as perfect hard-spheres, or point-masses with simplistic interparticle interactions. In stark contrast to this, MD nowadays sees major applications to the dynamics of proteins and other biological systems.[3] Compared to the original systems, these new ones are full of complex degrees of freedom, huge varieties of interparticle forces, variable responses to potentials, and potentially involving proteins kDa&#039;s in size. This area is of great interest, due to the dynamics of proteins underpinning their biological action. As such, competent understanding of them may allow the directing of new medicines and pharmaceutical techniques.[4]&lt;br /&gt;
&lt;br /&gt;
The basic structure of Molecular Dynamics is fairly simplistic in principle &amp;amp;mdash; we evaluate the force on each particle in our system (often neglecting the majority of pair interactions), use that to determine the acceleration, propagate the particles some small distance in time, update the new positions and velocities, and then repeat as needed. There are a wide variety of methodologies that allow one to put this process into practice. The simulations in this work follow the Velocity&amp;amp;ndash;Verlet algorithm, explanations of which can be found [2,5].&lt;br /&gt;
&lt;br /&gt;
The forces between particles in your system define the properties that system will have. In this work the Lennard-Jones potential is used, defined in Eq. 1.[6] As such we are modeling the Lennard-Jones fluid, the phase diagram of which is also provided in Fig. 1.[2,7,8] Throughout this work, it is our goal to navigate the thermodynamic properties of this system using the tools of Molecular Dynamics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 1: &amp;lt;math&amp;gt; \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:20180326 145146.svg|600 px|thumb|centre|Fig. 1 &amp;amp;ndash; The phase diagram of the Lennard-Jones fluid]]&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS.[9] VMD was also used in visualising and analysing the results of said calculations.[10] All further analysis was performed utilising the Python programming language, with project code provided where relevant.[11] All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3 or 3.2&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate.&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London. Unless stated otherwise, all reported values are in Lennard-Jones reduced units.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures 1.0, 2.0, 2.6, 3.0, 4.0. Temperatures were set from 1 to 3.5. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. 2. These simulations were performed for the densities 0.2, 0.5, 0.8 the temperature range 1.0&amp;amp;ndash;4.0. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 2: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD, the trajectories were then visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid[2,7,8], the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this, five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. 2 &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. 2 it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. 3&amp;amp;ndash;5 shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 1 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. 3 &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. 4 &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. 5 &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. 6. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. 6 &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. 6 are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. 7. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. 7 &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. 2, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. 8 below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. 8 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. 8 by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. 9 shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. 1, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. 9 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. 10.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. 10 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give system in the solid, liquid, and vapour phases. The trajectories of these systems were measured, and passed to VMD to allow calculation of the Radial Distribution Fuction g(r) for each system. The integrals of this function were also calculated. The RDF for each phase is given in Figs. 11&amp;amp;ndash;13.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 2 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_rdf.PNG|600 px|thumb|centre|Fig. 11 &amp;amp;ndash; RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_rdf.PNG|600 px|thumb|centre|Fig. 12 &amp;amp;ndash; RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_rdf.PNG|600 px|thumb|centre|Fig. 13 &amp;amp;ndash; RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid is complex, yet well structured. Here each peak corresponds to a lattice point some distance away from another point. The first three peaks are at reduced distances of 1.025, 1.475, and 1.825. Therefore for the argon system these distances correspond to 349, 502, and 620 pm. An experimentally determined lattice parameter for the argon crystal is a=525.6 pm.[12] This gives rise to the first three nearest lattice points being &amp;lt;math&amp;gt;\sqrt{2*525.6^2},\ 525.6,\ (525.6^2 + 2(0.5*525.6)^2)^{1/3}&amp;lt;/math&amp;gt;, equal to 372, 526, and 643 pm. These values are approximately equal, varying by ca. 20 pm, demonstrating that the lattice spacings can be approximately determined by evaluating the RDF.&lt;br /&gt;
&lt;br /&gt;
The RDFs for the liquid and vapour phases are similar, they both have a peak at approximately 1&amp;amp;sigma;, they oscillate with a period of 1&amp;amp;sigma;, with the gas RDF decaying much faster. This is explained by the high density of a liquid, meaning that a large number of particles are found within a few &amp;amp;sigma; of each other, whereas a gas is diffuse and therefore has few nearby particles. The peak around 1&amp;amp;sigma; for the gas is explained by the fact that when two gas particles collide, they decelerate before beginning to move away from each other. This results in colliding particles spending a significant amount of time about 1&amp;amp;sigma; apart, giving rise to the aforementioned peak.&lt;br /&gt;
&lt;br /&gt;
The integrals of the RDFs are also included for the three phases as Figs. 14&amp;amp;ndash;16. Here the number integral is given from 0&amp;amp;ndash;7&amp;amp;sigma;. The graphs for the solid and gas appear as expected &amp;amp;mdash; an exponential increase in number integral over distance. The integrals show that the more atoms are present within 10&amp;amp;sigma; for the solid than within the gas, about 5100 &#039;&#039;vs&#039;&#039; 1750. This is just down to the higher density of the solid. The graph for the liquid is more complex, it begins by increasing exponentially, but then begins to tail off after approximately 8&amp;amp;sigma;. This can be explained by a finite size error &amp;amp;mdash; the sphere it is integrating over begins to extend past the walls of the simulation volume, which is approximately 16&amp;amp;sigma; side-to-side&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 3 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_int.PNG|600 px|thumb|centre|Fig. 14 &amp;amp;ndash; Integral of RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_int.PNG|600 px|thumb|centre|Fig. 15 &amp;amp;ndash; Integral of RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_int.PNG|600 px|thumb|centre|Fig. 16 &amp;amp;ndash; Integral of RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase, the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. 17, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. 17 &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. 18&amp;amp;ndash;19.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. 18 &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. 19 &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
:[1] &amp;amp;ndash; B.J. Alder and T.E. Wainwright, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1959, &#039;&#039;&#039;31&#039;&#039;&#039;&lt;br /&gt;
:[2] &amp;amp;ndash; J.M. Haile, &#039;&#039;Molecular Dynamics Simulation: Elementary Methods&#039;&#039;, John Wiley &amp;amp; Sons, Inc., New York, 1997&lt;br /&gt;
:[3] &amp;amp;ndash; A. Hospital, J.R. Goni, M. Orozco, and J.L. Gelpi, &#039;&#039;Adv. App. Bioinf. Chem.&#039;&#039;, 2015, &#039;&#039;&#039;8&#039;&#039;&#039;, 37&amp;amp;ndash;47 &lt;br /&gt;
:[4] &amp;amp;ndash; L. Yang, P. Sang, Y. Tao, Y. Fu, K. Zhang, Y. Xie, and S. Lie, &#039;&#039;J. Biomol. Struct. Dyn.&#039;&#039;, 2014, &#039;&#039;&#039;32&#039;&#039;&#039;, 372&amp;amp;ndash;393&lt;br /&gt;
:[5] &amp;amp;ndash; W.C. Swope, H.C. Andersen, P.H. Berens, and K.R. Wilson, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1982, &#039;&#039;&#039;76&#039;&#039;&#039;, 637&amp;amp;ndash;649&lt;br /&gt;
:[6] &amp;amp;ndash; M.P Allen, &#039;&#039;Compuational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes&#039;&#039;, N. Attig, K. Binder, H. Grubmuller, and K. Kremer (Ed), 2004, pp.1&amp;amp;ndash;28, 3-00-012641-4&lt;br /&gt;
:[7] &amp;amp;ndash; J.J. Nicolas, K.E. Gubbins, W.B. Streett, and D.J. Tildesley, &#039;&#039;Mol. Phys.&#039;&#039;, 1967, &#039;&#039;&#039;37&#039;&#039;&#039;&lt;br /&gt;
:[8] &amp;amp;ndash; J.P. Hansen, and I.R. McDonald, &#039;&#039;Theory of Simple Liquids&#039;&#039;, 1st Ed, Academic, London, 1976  &lt;br /&gt;
:[9] &amp;amp;ndash; S. Plimpton, &#039;&#039;J. Comp. Phys.&#039;&#039;, 1995, &#039;&#039;&#039;117&#039;&#039;&#039;, 1&amp;amp;ndash;19&lt;br /&gt;
:[10] &amp;amp;ndash; W. Humphrey, A. Dalke, K. Schulten, &#039;&#039;J. Molec. Graphics&#039;&#039;, 1996, &#039;&#039;&#039;14&#039;&#039;&#039;, 33&amp;amp;ndash;38&lt;br /&gt;
:[11] &amp;amp;ndash; Python Software Foundation, Python Language Reference, version 3.0. Available at http://www.python.org&lt;br /&gt;
:[12] &amp;amp;ndash; D. G. Henshaw, &#039;&#039;Phys. Rev.&#039;&#039;, 1958, &#039;&#039;&#039;111&#039;&#039;&#039;, 1470&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file ([[Media:FHT14HO.xls|here]]).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig. 20, alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 4 &amp;amp;ndash; Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. 20 &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. 21 &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. For a time-step of 0.55 it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. 3), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. The total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1 changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 3 &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14HO.xls&amp;diff=695957</id>
		<title>File:FHT14HO.xls</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14HO.xls&amp;diff=695957"/>
		<updated>2018-03-28T10:05:29Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695956</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695956"/>
		<updated>2018-03-28T10:04:47Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Calculating Heat Capacity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
Felix Henry Thompson – 00930702 – 28&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; March 2018&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate that Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to be made using calculations taking less than five minutes to complete. This work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Molecular Dynamics was first conceptually described in the 1950s, not seeing general use until the mid-1970s.[1] As a technique, it sought to confront the age-old difficulty of solving the N-body problem &amp;amp;mdash; how could one evaluate how a large system of bodies develops through time? It was the advent of accessible computing which provided the work-power needed to resolve this problem. With modern personal computing power, as well as access to specialised computing facilities, systems containing thousands of bodies can be evaluated, with results being presented in seconds and minutes, rather than weeks and months.[2]&lt;br /&gt;
&lt;br /&gt;
Originally Molecular Dynamics was only being applied to small, well-defined, near-theoretical, systems such as perfect hard-spheres, or point-masses with simplistic interparticle interactions. In stark contrast to this, MD nowadays sees major applications to the dynamics of proteins and other biological systems.[3] Compared to the original systems, these new ones are full of complex degrees of freedom, huge varieties of interparticle forces, variable responses to potentials, and potentially involving proteins kDa&#039;s in size. This area is of great interest, due to the dynamics of proteins underpinning their biological action. As such, competent understanding of them may allow the directing of new medicines and pharmaceutical techniques.[4]&lt;br /&gt;
&lt;br /&gt;
The basic structure of Molecular Dynamics is fairly simplistic in principle &amp;amp;mdash; we evaluate the force on each particle in our system (often neglecting the majority of pair interactions), use that to determine the acceleration, propagate the particles some small distance in time, update the new positions and velocities, and then repeat as needed. There are a wide variety of methodologies that allow one to put this process into practice. The simulations in this work follow the Velocity&amp;amp;ndash;Verlet algorithm, explanations of which can be found [2,5].&lt;br /&gt;
&lt;br /&gt;
The forces between particles in your system define the properties that system will have. In this work the Lennard-Jones potential is used, defined in Eq. 1.[6] As such we are modeling the Lennard-Jones fluid, the phase diagram of which is also provided in Fig. 1.[2,7,8] Throughout this work, it is our goal to navigate the thermodynamic properties of this system using the tools of Molecular Dynamics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 1: &amp;lt;math&amp;gt; \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:20180326 145146.svg|600 px|thumb|centre|Fig. 1 &amp;amp;ndash; The phase diagram of the Lennard-Jones fluid]]&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS.[9] VMD was also used in visualising and analysing the results of said calculations.[10] All further analysis was performed utilising the Python programming language, with project code provided where relevant.[11] All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3 or 3.2&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate.&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London. Unless stated otherwise, all reported values are in Lennard-Jones reduced units.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures 1.0, 2.0, 2.6, 3.0, 4.0. Temperatures were set from 1 to 3.5. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. 2. These simulations were performed for the densities 0.2, 0.5, 0.8 the temperature range 1.0&amp;amp;ndash;4.0. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 2: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD, the trajectories were then visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid[2,7,8], the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this, five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. 2 &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. 2 it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. 3&amp;amp;ndash;5 shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 1 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. 3 &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. 4 &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. 5 &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. 6. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. 6 &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. 6 are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. 7. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. 7 &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. 2, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. 8 below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. 8 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. 8 by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. 9 shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. 1, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. 9 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. 10.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. 10 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give system in the solid, liquid, and vapour phases. The trajectories of these systems were measured, and passed to VMD to allow calculation of the Radial Distribution Fuction g(r) for each system. The integrals of this function were also calculated. The RDF for each phase is given in Figs. 11&amp;amp;ndash;13.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 2 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_rdf.PNG|600 px|thumb|centre|Fig. 11 &amp;amp;ndash; RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_rdf.PNG|600 px|thumb|centre|Fig. 12 &amp;amp;ndash; RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_rdf.PNG|600 px|thumb|centre|Fig. 13 &amp;amp;ndash; RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid is complex, yet well structured. Here each peak corresponds to a lattice point some distance away from another point. The first three peaks are at reduced distances of 1.025, 1.475, and 1.825. Therefore for the argon system these distances correspond to 349, 502, and 620 pm. An experimentally determined lattice parameter for the argon crystal is a=525.6 pm.[12] This gives rise to the first three nearest lattice points being &amp;lt;math&amp;gt;\sqrt{2*525.6^2},\ 525.6,\ (525.6^2 + 2(0.5*525.6)^2)^{1/3}&amp;lt;/math&amp;gt;, equal to 372, 526, and 643 pm. These values are approximately equal, varying by ca. 20 pm, demonstrating that the lattice spacings can be approximately determined by evaluating the RDF.&lt;br /&gt;
&lt;br /&gt;
The RDFs for the liquid and vapour phases are similar, they both have a peak at approximately 1&amp;amp;sigma;, they oscillate with a period of 1&amp;amp;sigma;, with the gas RDF decaying much faster. This is explained by the high density of a liquid, meaning that a large number of particles are found within a few &amp;amp;sigma; of each other, whereas a gas is diffuse and therefore has few nearby particles. The peak around 1&amp;amp;sigma; for the gas is explained by the fact that when two gas particles collide, they decelerate before beginning to move away from each other. This results in colliding particles spending a significant amount of time about 1&amp;amp;sigma; apart, giving rise to the aforementioned peak.&lt;br /&gt;
&lt;br /&gt;
The integrals of the RDFs are also included for the three phases as Figs. 14&amp;amp;ndash;16. Here the number integral is given from 0&amp;amp;ndash;7&amp;amp;sigma;. The graphs for the solid and gas appear as expected &amp;amp;mdash; an exponential increase in number integral over distance. The integrals show that the more atoms are present within 10&amp;amp;sigma; for the solid than within the gas, about 5100 &#039;&#039;vs&#039;&#039; 1750. This is just down to the higher density of the solid. The graph for the liquid is more complex, it begins by increasing exponentially, but then begins to tail off after approximately 8&amp;amp;sigma;. This can be explained by a finite size error &amp;amp;mdash; the sphere it is integrating over begins to extend past the walls of the simulation volume, which is approximately 16&amp;amp;sigma; side-to-side&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 3 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_int.PNG|600 px|thumb|centre|Fig. 14 &amp;amp;ndash; Integral of RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_int.PNG|600 px|thumb|centre|Fig. 15 &amp;amp;ndash; Integral of RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_int.PNG|600 px|thumb|centre|Fig. 16 &amp;amp;ndash; Integral of RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase, the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. 17, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. 17 &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. 18&amp;amp;ndash;19.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. 18 &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. 19 &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
:[1] &amp;amp;ndash; B.J. Alder and T.E. Wainwright, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1959, &#039;&#039;&#039;31&#039;&#039;&#039;&lt;br /&gt;
:[2] &amp;amp;ndash; J.M. Haile, &#039;&#039;Molecular Dynamics Simulation: Elementary Methods&#039;&#039;, John Wiley &amp;amp; Sons, Inc., New York, 1997&lt;br /&gt;
:[3] &amp;amp;ndash; A. Hospital, J.R. Goni, M. Orozco, and J.L. Gelpi, &#039;&#039;Adv. App. Bioinf. Chem.&#039;&#039;, 2015, &#039;&#039;&#039;8&#039;&#039;&#039;, 37&amp;amp;ndash;47 &lt;br /&gt;
:[4] &amp;amp;ndash; L. Yang, P. Sang, Y. Tao, Y. Fu, K. Zhang, Y. Xie, and S. Lie, &#039;&#039;J. Biomol. Struct. Dyn.&#039;&#039;, 2014, &#039;&#039;&#039;32&#039;&#039;&#039;, 372&amp;amp;ndash;393&lt;br /&gt;
:[5] &amp;amp;ndash; W.C. Swope, H.C. Andersen, P.H. Berens, and K.R. Wilson, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1982, &#039;&#039;&#039;76&#039;&#039;&#039;, 637&amp;amp;ndash;649&lt;br /&gt;
:[6] &amp;amp;ndash; M.P Allen, &#039;&#039;Compuational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes&#039;&#039;, N. Attig, K. Binder, H. Grubmuller, and K. Kremer (Ed), 2004, pp.1&amp;amp;ndash;28, 3-00-012641-4&lt;br /&gt;
:[7] &amp;amp;ndash; J.J. Nicolas, K.E. Gubbins, W.B. Streett, and D.J. Tildesley, &#039;&#039;Mol. Phys.&#039;&#039;, 1967, &#039;&#039;&#039;37&#039;&#039;&#039;&lt;br /&gt;
:[8] &amp;amp;ndash; J.P. Hansen, and I.R. McDonald, &#039;&#039;Theory of Simple Liquids&#039;&#039;, 1st Ed, Academic, London, 1976  &lt;br /&gt;
:[9] &amp;amp;ndash; S. Plimpton, &#039;&#039;J. Comp. Phys.&#039;&#039;, 1995, &#039;&#039;&#039;117&#039;&#039;&#039;, 1&amp;amp;ndash;19&lt;br /&gt;
:[10] &amp;amp;ndash; W. Humphrey, A. Dalke, K. Schulten, &#039;&#039;J. Molec. Graphics&#039;&#039;, 1996, &#039;&#039;&#039;14&#039;&#039;&#039;, 33&amp;amp;ndash;38&lt;br /&gt;
:[11] &amp;amp;ndash; Python Software Foundation, Python Language Reference, version 3.0. Available at http://www.python.org&lt;br /&gt;
:[12] &amp;amp;ndash; D. G. Henshaw, &#039;&#039;Phys. Rev.&#039;&#039;, 1958, &#039;&#039;&#039;111&#039;&#039;&#039;, 1470&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig. 20, alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 4 &amp;amp;ndash; Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. 20 &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. 21 &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. For a time-step of 0.55 it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. 3), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. The total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1 changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 3 &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695955</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695955"/>
		<updated>2018-03-28T10:03:36Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Methods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
Felix Henry Thompson – 00930702 – 28&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; March 2018&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate that Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to be made using calculations taking less than five minutes to complete. This work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Molecular Dynamics was first conceptually described in the 1950s, not seeing general use until the mid-1970s.[1] As a technique, it sought to confront the age-old difficulty of solving the N-body problem &amp;amp;mdash; how could one evaluate how a large system of bodies develops through time? It was the advent of accessible computing which provided the work-power needed to resolve this problem. With modern personal computing power, as well as access to specialised computing facilities, systems containing thousands of bodies can be evaluated, with results being presented in seconds and minutes, rather than weeks and months.[2]&lt;br /&gt;
&lt;br /&gt;
Originally Molecular Dynamics was only being applied to small, well-defined, near-theoretical, systems such as perfect hard-spheres, or point-masses with simplistic interparticle interactions. In stark contrast to this, MD nowadays sees major applications to the dynamics of proteins and other biological systems.[3] Compared to the original systems, these new ones are full of complex degrees of freedom, huge varieties of interparticle forces, variable responses to potentials, and potentially involving proteins kDa&#039;s in size. This area is of great interest, due to the dynamics of proteins underpinning their biological action. As such, competent understanding of them may allow the directing of new medicines and pharmaceutical techniques.[4]&lt;br /&gt;
&lt;br /&gt;
The basic structure of Molecular Dynamics is fairly simplistic in principle &amp;amp;mdash; we evaluate the force on each particle in our system (often neglecting the majority of pair interactions), use that to determine the acceleration, propagate the particles some small distance in time, update the new positions and velocities, and then repeat as needed. There are a wide variety of methodologies that allow one to put this process into practice. The simulations in this work follow the Velocity&amp;amp;ndash;Verlet algorithm, explanations of which can be found [2,5].&lt;br /&gt;
&lt;br /&gt;
The forces between particles in your system define the properties that system will have. In this work the Lennard-Jones potential is used, defined in Eq. 1.[6] As such we are modeling the Lennard-Jones fluid, the phase diagram of which is also provided in Fig. 1.[2,7,8] Throughout this work, it is our goal to navigate the thermodynamic properties of this system using the tools of Molecular Dynamics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 1: &amp;lt;math&amp;gt; \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:20180326 145146.svg|600 px|thumb|centre|Fig. 1 &amp;amp;ndash; The phase diagram of the Lennard-Jones fluid]]&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS.[9] VMD was also used in visualising and analysing the results of said calculations.[10] All further analysis was performed utilising the Python programming language, with project code provided where relevant.[11] All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3 or 3.2&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate.&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London. Unless stated otherwise, all reported values are in Lennard-Jones reduced units.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures 1.0, 2.0, 2.6, 3.0, 4.0. Temperatures were set from 1 to 3.5. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. 2. These simulations were performed for the densities 0.2, 0.5, 0.8 the temperature range 1.0&amp;amp;ndash;4.0. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 2: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD, the trajectories were then visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid[2,7,8], the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this, five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. 2 &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. 2 it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. 3&amp;amp;ndash;5 shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 1 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. 3 &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. 4 &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. 5 &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. 6. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. 6 &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. 6 are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. 7. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. 7 &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. 2, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. 8 below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. 8 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. 8 by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. 9 shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. 1, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. 9 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. 10.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. 10 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give system in the solid, liquid, and vapour phases. The trajectories of these systems were measured, and passed to VMD to allow calculation of the Radial Distribution Fuction g(r) for each system. The integrals of this function were also calculated. The RDF for each phase is given in Figs. 11&amp;amp;ndash;13.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 2 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_rdf.PNG|600 px|thumb|centre|Fig. 11 &amp;amp;ndash; RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_rdf.PNG|600 px|thumb|centre|Fig. 12 &amp;amp;ndash; RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_rdf.PNG|600 px|thumb|centre|Fig. 13 &amp;amp;ndash; RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid is complex, yet well structured. Here each peak corresponds to a lattice point some distance away from another point. The first three peaks are at reduced distances of 1.025, 1.475, and 1.825. Therefore for the argon system these distances correspond to 349, 502, and 620 pm. An experimentally determined lattice parameter for the argon crystal is a=525.6 pm.[12] This gives rise to the first three nearest lattice points being &amp;lt;math&amp;gt;\sqrt{2*525.6^2},\ 525.6,\ (525.6^2 + 2(0.5*525.6)^2)^{1/3}&amp;lt;/math&amp;gt;, equal to 372, 526, and 643 pm. These values are approximately equal, varying by ca. 20 pm, demonstrating that the lattice spacings can be approximately determined by evaluating the RDF.&lt;br /&gt;
&lt;br /&gt;
The RDFs for the liquid and vapour phases are similar, they both have a peak at approximately 1&amp;amp;sigma;, they oscillate with a period of 1&amp;amp;sigma;, with the gas RDF decaying much faster. This is explained by the high density of a liquid, meaning that a large number of particles are found within a few &amp;amp;sigma; of each other, whereas a gas is diffuse and therefore has few nearby particles. The peak around 1&amp;amp;sigma; for the gas is explained by the fact that when two gas particles collide, they decelerate before beginning to move away from each other. This results in colliding particles spending a significant amount of time about 1&amp;amp;sigma; apart, giving rise to the aforementioned peak.&lt;br /&gt;
&lt;br /&gt;
The integrals of the RDFs are also included for the three phases as Figs. 14&amp;amp;ndash;16. Here the number integral is given from 0&amp;amp;ndash;7&amp;amp;sigma;. The graphs for the solid and gas appear as expected &amp;amp;mdash; an exponential increase in number integral over distance. The integrals show that the more atoms are present within 10&amp;amp;sigma; for the solid than within the gas, about 5100 &#039;&#039;vs&#039;&#039; 1750. This is just down to the higher density of the solid. The graph for the liquid is more complex, it begins by increasing exponentially, but then begins to tail off after approximately 8&amp;amp;sigma;. This can be explained by a finite size error &amp;amp;mdash; the sphere it is integrating over begins to extend past the walls of the simulation volume, which is approximately 16&amp;amp;sigma; side-to-side&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 3 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_int.PNG|600 px|thumb|centre|Fig. 14 &amp;amp;ndash; Integral of RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_int.PNG|600 px|thumb|centre|Fig. 15 &amp;amp;ndash; Integral of RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_int.PNG|600 px|thumb|centre|Fig. 16 &amp;amp;ndash; Integral of RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase, the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. 17, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. 17 &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. 18&amp;amp;ndash;19.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. 18 &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. 19 &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
:[1] &amp;amp;ndash; B.J. Alder and T.E. Wainwright, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1959, &#039;&#039;&#039;31&#039;&#039;&#039;&lt;br /&gt;
:[2] &amp;amp;ndash; J.M. Haile, &#039;&#039;Molecular Dynamics Simulation: Elementary Methods&#039;&#039;, John Wiley &amp;amp; Sons, Inc., New York, 1997&lt;br /&gt;
:[3] &amp;amp;ndash; A. Hospital, J.R. Goni, M. Orozco, and J.L. Gelpi, &#039;&#039;Adv. App. Bioinf. Chem.&#039;&#039;, 2015, &#039;&#039;&#039;8&#039;&#039;&#039;, 37&amp;amp;ndash;47 &lt;br /&gt;
:[4] &amp;amp;ndash; L. Yang, P. Sang, Y. Tao, Y. Fu, K. Zhang, Y. Xie, and S. Lie, &#039;&#039;J. Biomol. Struct. Dyn.&#039;&#039;, 2014, &#039;&#039;&#039;32&#039;&#039;&#039;, 372&amp;amp;ndash;393&lt;br /&gt;
:[5] &amp;amp;ndash; W.C. Swope, H.C. Andersen, P.H. Berens, and K.R. Wilson, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1982, &#039;&#039;&#039;76&#039;&#039;&#039;, 637&amp;amp;ndash;649&lt;br /&gt;
:[6] &amp;amp;ndash; M.P Allen, &#039;&#039;Compuational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes&#039;&#039;, N. Attig, K. Binder, H. Grubmuller, and K. Kremer (Ed), 2004, pp.1&amp;amp;ndash;28, 3-00-012641-4&lt;br /&gt;
:[7] &amp;amp;ndash; J.J. Nicolas, K.E. Gubbins, W.B. Streett, and D.J. Tildesley, &#039;&#039;Mol. Phys.&#039;&#039;, 1967, &#039;&#039;&#039;37&#039;&#039;&#039;&lt;br /&gt;
:[8] &amp;amp;ndash; J.P. Hansen, and I.R. McDonald, &#039;&#039;Theory of Simple Liquids&#039;&#039;, 1st Ed, Academic, London, 1976  &lt;br /&gt;
:[9] &amp;amp;ndash; S. Plimpton, &#039;&#039;J. Comp. Phys.&#039;&#039;, 1995, &#039;&#039;&#039;117&#039;&#039;&#039;, 1&amp;amp;ndash;19&lt;br /&gt;
:[10] &amp;amp;ndash; W. Humphrey, A. Dalke, K. Schulten, &#039;&#039;J. Molec. Graphics&#039;&#039;, 1996, &#039;&#039;&#039;14&#039;&#039;&#039;, 33&amp;amp;ndash;38&lt;br /&gt;
:[11] &amp;amp;ndash; Python Software Foundation, Python Language Reference, version 3.0. Available at http://www.python.org&lt;br /&gt;
:[12] &amp;amp;ndash; D. G. Henshaw, &#039;&#039;Phys. Rev.&#039;&#039;, 1958, &#039;&#039;&#039;111&#039;&#039;&#039;, 1470&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig. 20, alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 4 &amp;amp;ndash; Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. 20 &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. 21 &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. For a time-step of 0.55 it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. 3), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. The total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1 changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 3 &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695951</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695951"/>
		<updated>2018-03-28T10:00:54Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
Felix Henry Thompson – 00930702 – 28&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; March 2018&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate that Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to be made using calculations taking less than five minutes to complete. This work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Molecular Dynamics was first conceptually described in the 1950s, not seeing general use until the mid-1970s.[1] As a technique, it sought to confront the age-old difficulty of solving the N-body problem &amp;amp;mdash; how could one evaluate how a large system of bodies develops through time? It was the advent of accessible computing which provided the work-power needed to resolve this problem. With modern personal computing power, as well as access to specialised computing facilities, systems containing thousands of bodies can be evaluated, with results being presented in seconds and minutes, rather than weeks and months.[2]&lt;br /&gt;
&lt;br /&gt;
Originally Molecular Dynamics was only being applied to small, well-defined, near-theoretical, systems such as perfect hard-spheres, or point-masses with simplistic interparticle interactions. In stark contrast to this, MD nowadays sees major applications to the dynamics of proteins and other biological systems.[3] Compared to the original systems, these new ones are full of complex degrees of freedom, huge varieties of interparticle forces, variable responses to potentials, and potentially involving proteins kDa&#039;s in size. This area is of great interest, due to the dynamics of proteins underpinning their biological action. As such, competent understanding of them may allow the directing of new medicines and pharmaceutical techniques.[4]&lt;br /&gt;
&lt;br /&gt;
The basic structure of Molecular Dynamics is fairly simplistic in principle &amp;amp;mdash; we evaluate the force on each particle in our system (often neglecting the majority of pair interactions), use that to determine the acceleration, propagate the particles some small distance in time, update the new positions and velocities, and then repeat as needed. There are a wide variety of methodologies that allow one to put this process into practice. The simulations in this work follow the Velocity&amp;amp;ndash;Verlet algorithm, explanations of which can be found [2,5].&lt;br /&gt;
&lt;br /&gt;
The forces between particles in your system define the properties that system will have. In this work the Lennard-Jones potential is used, defined in Eq. 1.[6] As such we are modeling the Lennard-Jones fluid, the phase diagram of which is also provided in Fig. 1.[2,7,8] Throughout this work, it is our goal to navigate the thermodynamic properties of this system using the tools of Molecular Dynamics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 1: &amp;lt;math&amp;gt; \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:20180326 145146.svg|600 px|thumb|centre|Fig. 1 &amp;amp;ndash; The phase diagram of the Lennard-Jones fluid]]&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS.[9] VMD was also used in visualising and analysing the results of said calculations.[10] All further analysis was performed utilising the Python programming language, with project code provided where relevant.[11] All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3 or 3.2&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate.&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London. Unless stated otherwise, all reported values are in Lennard-Jones reduced units.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures 1.0, 2.0, 2.6, 3.0, 4.0. Temperatures were set from 1 to 3.5. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. 2. These simulations were performed for the densities 0.2, 0.5, 0.8 the temperature range 1.0&amp;amp;ndash;4.0. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 2: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD, the trajectories were then visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@phasesource), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this, five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. 2 &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. 2 it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. 3&amp;amp;ndash;5 shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 1 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. 3 &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. 4 &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. 5 &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. 6. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. 6 &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. 6 are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. 7. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. 7 &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. 2, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. 8 below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. 8 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. 8 by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. 9 shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. 1, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. 9 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. 10.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. 10 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give system in the solid, liquid, and vapour phases. The trajectories of these systems were measured, and passed to VMD to allow calculation of the Radial Distribution Fuction g(r) for each system. The integrals of this function were also calculated. The RDF for each phase is given in Figs. 11&amp;amp;ndash;13.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 2 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_rdf.PNG|600 px|thumb|centre|Fig. 11 &amp;amp;ndash; RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_rdf.PNG|600 px|thumb|centre|Fig. 12 &amp;amp;ndash; RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_rdf.PNG|600 px|thumb|centre|Fig. 13 &amp;amp;ndash; RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid is complex, yet well structured. Here each peak corresponds to a lattice point some distance away from another point. The first three peaks are at reduced distances of 1.025, 1.475, and 1.825. Therefore for the argon system these distances correspond to 349, 502, and 620 pm. An experimentally determined lattice parameter for the argon crystal is a=525.6 pm.[12] This gives rise to the first three nearest lattice points being &amp;lt;math&amp;gt;\sqrt{2*525.6^2},\ 525.6,\ (525.6^2 + 2(0.5*525.6)^2)^{1/3}&amp;lt;/math&amp;gt;, equal to 372, 526, and 643 pm. These values are approximately equal, varying by ca. 20 pm, demonstrating that the lattice spacings can be approximately determined by evaluating the RDF.&lt;br /&gt;
&lt;br /&gt;
The RDFs for the liquid and vapour phases are similar, they both have a peak at approximately 1&amp;amp;sigma;, they oscillate with a period of 1&amp;amp;sigma;, with the gas RDF decaying much faster. This is explained by the high density of a liquid, meaning that a large number of particles are found within a few &amp;amp;sigma; of each other, whereas a gas is diffuse and therefore has few nearby particles. The peak around 1&amp;amp;sigma; for the gas is explained by the fact that when two gas particles collide, they decelerate before beginning to move away from each other. This results in colliding particles spending a significant amount of time about 1&amp;amp;sigma; apart, giving rise to the aforementioned peak.&lt;br /&gt;
&lt;br /&gt;
The integrals of the RDFs are also included for the three phases as Figs. 14&amp;amp;ndash;16. Here the number integral is given from 0&amp;amp;ndash;7&amp;amp;sigma;. The graphs for the solid and gas appear as expected &amp;amp;mdash; an exponential increase in number integral over distance. The integrals show that the more atoms are present within 10&amp;amp;sigma; for the solid than within the gas, about 5100 &#039;&#039;vs&#039;&#039; 1750. This is just down to the higher density of the solid. The graph for the liquid is more complex, it begins by increasing exponentially, but then begins to tail off after approximately 8&amp;amp;sigma;. This can be explained by a finite size error &amp;amp;mdash; the sphere it is integrating over begins to extend past the walls of the simulation volume, which is approximately 16&amp;amp;sigma; side-to-side&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 3 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_int.PNG|600 px|thumb|centre|Fig. 14 &amp;amp;ndash; Integral of RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_int.PNG|600 px|thumb|centre|Fig. 15 &amp;amp;ndash; Integral of RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_int.PNG|600 px|thumb|centre|Fig. 16 &amp;amp;ndash; Integral of RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase, the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. 17, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. 17 &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. 18&amp;amp;ndash;19.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. 18 &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. 19 &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
:[1] &amp;amp;ndash; B.J. Alder and T.E. Wainwright, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1959, &#039;&#039;&#039;31&#039;&#039;&#039;&lt;br /&gt;
:[2] &amp;amp;ndash; J.M. Haile, &#039;&#039;Molecular Dynamics Simulation: Elementary Methods&#039;&#039;, John Wiley &amp;amp; Sons, Inc., New York, 1997&lt;br /&gt;
:[3] &amp;amp;ndash; A. Hospital, J.R. Goni, M. Orozco, and J.L. Gelpi, &#039;&#039;Adv. App. Bioinf. Chem.&#039;&#039;, 2015, &#039;&#039;&#039;8&#039;&#039;&#039;, 37&amp;amp;ndash;47 &lt;br /&gt;
:[4] &amp;amp;ndash; L. Yang, P. Sang, Y. Tao, Y. Fu, K. Zhang, Y. Xie, and S. Lie, &#039;&#039;J. Biomol. Struct. Dyn.&#039;&#039;, 2014, &#039;&#039;&#039;32&#039;&#039;&#039;, 372&amp;amp;ndash;393&lt;br /&gt;
:[5] &amp;amp;ndash; W.C. Swope, H.C. Andersen, P.H. Berens, and K.R. Wilson, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1982, &#039;&#039;&#039;76&#039;&#039;&#039;, 637&amp;amp;ndash;649&lt;br /&gt;
:[6] &amp;amp;ndash; M.P Allen, &#039;&#039;Compuational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes&#039;&#039;, N. Attig, K. Binder, H. Grubmuller, and K. Kremer (Ed), 2004, pp.1&amp;amp;ndash;28, 3-00-012641-4&lt;br /&gt;
:[7] &amp;amp;ndash; J.J. Nicolas, K.E. Gubbins, W.B. Streett, and D.J. Tildesley, &#039;&#039;Mol. Phys.&#039;&#039;, 1967, &#039;&#039;&#039;37&#039;&#039;&#039;&lt;br /&gt;
:[8] &amp;amp;ndash; J.P. Hansen, and I.R. McDonald, &#039;&#039;Theory of Simple Liquids&#039;&#039;, 1st Ed, Academic, London, 1976  &lt;br /&gt;
:[9] &amp;amp;ndash; S. Plimpton, &#039;&#039;J. Comp. Phys.&#039;&#039;, 1995, &#039;&#039;&#039;117&#039;&#039;&#039;, 1&amp;amp;ndash;19&lt;br /&gt;
:[10] &amp;amp;ndash; W. Humphrey, A. Dalke, K. Schulten, &#039;&#039;J. Molec. Graphics&#039;&#039;, 1996, &#039;&#039;&#039;14&#039;&#039;&#039;, 33&amp;amp;ndash;38&lt;br /&gt;
:[11] &amp;amp;ndash; Python Software Foundation, Python Language Reference, version 3.0. Available at http://www.python.org&lt;br /&gt;
:[12] &amp;amp;ndash; D. G. Henshaw, &#039;&#039;Phys. Rev.&#039;&#039;, 1958, &#039;&#039;&#039;111&#039;&#039;&#039;, 1470&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig. 20, alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 4 &amp;amp;ndash; Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. 20 &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. 21 &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. For a time-step of 0.55 it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. 3), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. The total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1 changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 3 &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695948</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695948"/>
		<updated>2018-03-28T09:58:36Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
Felix Henry Thompson – 00930702 – 28&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; March 2018&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate that Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to be made using calculations taking less than five minutes to complete. This work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Molecular Dynamics was first conceptually described in the 1950s, not seeing general use until the mid-1970s.[@@@50s paper] As a technique, it sought to confront the age-old difficulty of solving the N-body problem &amp;amp;mdash; how could one evaluate how a large system of bodies develops through time? It was the advent of accessible computing which provided the work-power needed to resolve this problem. With modern personal computing power, as well as access to specialised computing facilities, systems containing thousands of bodies can be evaluated, with results being presented in seconds and minutes, rather than weeks and months.[@@@book]&lt;br /&gt;
&lt;br /&gt;
Originally Molecular Dynamics was only being applied to small, well-defined, near-theoretical, systems such as perfect hard-spheres, or point-masses with simplistic interparticle interactions. In stark contrast to this, MD nowadays sees major applications to the dynamics of proteins and other biological systems.[@@@dynamicsoverview] Compared to the original systems, these new ones are full of complex degrees of freedom, huge varieties of interparticle forces, variable responses to potentials, and potentially involving proteins kDa&#039;s in size. This area is of great interest, due to the dynamics of proteins underpinning their biological action. As such, competent understanding of them may allow the directing of new medicines and pharmaceutical techniques.[@@@proteindynamics]&lt;br /&gt;
&lt;br /&gt;
The basic structure of Molecular Dynamics is fairly simplistic in principle &amp;amp;mdash; we evaluate the force on each particle in our system (often neglecting the majority of pair interactions), use that to determine the acceleration, propagate the particles some small distance in time, update the new positions and velocities, and then repeat as needed. There are a wide variety of methodologies that allow one to put this process into practice. The simulations in this work follow the Velocity&amp;amp;ndash;Verlet algorithm, explanations of which can be found [@@@book/swope].&lt;br /&gt;
&lt;br /&gt;
The forces between particles in your system define the properties that system will have. In this work the Lennard-Jones potential is used, defined in Eq. 1.[notes] As such we are modeling the Lennard-Jones fluid, the phase diagram of which is also provided in Fig. 1.[@@@book &amp;amp; its 2 refs] Throughout this work, it is our goal to navigate the thermodynamic properties of this system using the tools of Molecular Dynamics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 1: &amp;lt;math&amp;gt; \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:20180326 145146.svg|600 px|thumb|centre|Fig. 1 &amp;amp;ndash; The phase diagram of the Lennard-Jones fluid]]&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3 or 3.2&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate.&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London. Unless stated otherwise, all reported values are in Lennard-Jones reduced units.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures 1.0, 2.0, 2.6, 3.0, 4.0. Temperatures were set from 1 to 3.5. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. 2. These simulations were performed for the densities 0.2, 0.5, 0.8 the temperature range 1.0&amp;amp;ndash;4.0. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 2: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD, the trajectories were then visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@phasesource), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this, five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. 2 &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. 2 it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. 3&amp;amp;ndash;5 shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 1 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. 3 &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. 4 &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. 5 &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. 6. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. 6 &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. 6 are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. 7. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. 7 &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. 2, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. 8 below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. 8 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. 8 by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. 9 shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. 1, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. 9 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. 10.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. 10 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give system in the solid, liquid, and vapour phases. The trajectories of these systems were measured, and passed to VMD to allow calculation of the Radial Distribution Fuction g(r) for each system. The integrals of this function were also calculated. The RDF for each phase is given in Figs. 11&amp;amp;ndash;13.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 2 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_rdf.PNG|600 px|thumb|centre|Fig. 11 &amp;amp;ndash; RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_rdf.PNG|600 px|thumb|centre|Fig. 12 &amp;amp;ndash; RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_rdf.PNG|600 px|thumb|centre|Fig. 13 &amp;amp;ndash; RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid is complex, yet well structured. Here each peak corresponds to a lattice point some distance away from another point. The first three peaks are at reduced distances of 1.025, 1.475, and 1.825. Therefore for the argon system these distances correspond to 349, 502, and 620 pm. An experimentally determined lattice parameter for the argon crystal is a=525.6 pm [@@@]. This gives rise to the first three nearest lattice points being &amp;lt;math&amp;gt;\sqrt{2*525.6^2},\ 525.6,\ (525.6^2 + 2(0.5*525.6)^2)^{1/3}&amp;lt;/math&amp;gt;, equal to 372, 526, and 643 pm. These values are approximately equal, varying by ca. 20 pm, demonstrating that the lattice spacings can be approximately determined by evaluating the RDF.&lt;br /&gt;
&lt;br /&gt;
The RDFs for the liquid and vapour phases are similar, they both have a peak at approximately 1&amp;amp;sigma;, they oscillate with a period of 1&amp;amp;sigma;, with the gas RDF decaying much faster. This is explained by the high density of a liquid, meaning that a large number of particles are found within a few &amp;amp;sigma; of each other, whereas a gas is diffuse and therefore has few nearby particles. The peak around 1&amp;amp;sigma; for the gas is explained by the fact that when two gas particles collide, they decelerate before beginning to move away from each other. This results in colliding particles spending a significant amount of time about 1&amp;amp;sigma; apart, giving rise to the aforementioned peak.&lt;br /&gt;
&lt;br /&gt;
The integrals of the RDFs are also included for the three phases as Figs. 14&amp;amp;ndash;16. Here the number integral is given from 0&amp;amp;ndash;7&amp;amp;sigma;. The graphs for the solid and gas appear as expected &amp;amp;mdash; an exponential increase in number integral over distance. The integrals show that the more atoms are present within 10&amp;amp;sigma; for the solid than within the gas, about 5100 &#039;&#039;vs&#039;&#039; 1750. This is just down to the higher density of the solid. The graph for the liquid is more complex, it begins by increasing exponentially, but then begins to tail off after approximately 8&amp;amp;sigma;. This can be explained by a finite size error &amp;amp;mdash; the sphere it is integrating over begins to extend past the walls of the simulation volume, which is approximately 16&amp;amp;sigma; side-to-side&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 3 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_int.PNG|600 px|thumb|centre|Fig. 14 &amp;amp;ndash; Integral of RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_int.PNG|600 px|thumb|centre|Fig. 15 &amp;amp;ndash; Integral of RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_int.PNG|600 px|thumb|centre|Fig. 16 &amp;amp;ndash; Integral of RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase, the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. 17, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. 17 &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. 18&amp;amp;ndash;19.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. 18 &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. 19 &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
:[1] &amp;amp;ndash; B.J. Alder and T.E. Wainwright, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1959, &#039;&#039;&#039;31&#039;&#039;&#039;&lt;br /&gt;
:[2] &amp;amp;ndash; J.M. Haile, &#039;&#039;Molecular Dynamics Simulation: Elementary Methods&#039;&#039;, John Wiley &amp;amp; Sons, Inc., New York, 1997&lt;br /&gt;
:[3] &amp;amp;ndash; A. Hospital, J.R. Goni, M. Orozco, and J.L. Gelpi, &#039;&#039;Adv. App. Bioinf. Chem.&#039;&#039;, 2015, &#039;&#039;&#039;8&#039;&#039;&#039;, 37&amp;amp;ndash;47 &lt;br /&gt;
:[4] &amp;amp;ndash; L. Yang, P. Sang, Y. Tao, Y. Fu, K. Zhang, Y. Xie, and S. Lie, &#039;&#039;J. Biomol. Struct. Dyn.&#039;&#039;, 2014, &#039;&#039;&#039;32&#039;&#039;&#039;, 372&amp;amp;ndash;393&lt;br /&gt;
:[5] &amp;amp;ndash; W.C. Swope, H.C. Andersen, P.H. Berens, and K.R. Wilson, &#039;&#039;J. Chem. Phys.&#039;&#039;, 1982, &#039;&#039;&#039;76&#039;&#039;&#039;, 637&amp;amp;ndash;649&lt;br /&gt;
:[6] &amp;amp;ndash; M.P Allen, &#039;&#039;Compuational Soft Matter: From Synthetic Polymers to Proteins, Lecture Notes&#039;&#039;, N. Attig, K. Binder, H. Grubmuller, and K. Kremer (Ed), 2004, pp.1&amp;amp;ndash;28, 3-00-012641-4&lt;br /&gt;
:[7] &amp;amp;ndash; J.J. Nicolas, K.E. Gubbins, W.B. Streett, and D.J. Tildesley, &#039;&#039;Mol. Phys.&#039;&#039;, 1967, &#039;&#039;&#039;37&#039;&#039;&#039;&lt;br /&gt;
:[8] &amp;amp;ndash; J.P. Hansen, and I.R. McDonald, &#039;&#039;Theory of Simple Liquids&#039;&#039;, 1st Ed, Academic, London, 1976  &lt;br /&gt;
:[9] &amp;amp;ndash; S. Plimpton, &#039;&#039;J. Comp. Phys.&#039;&#039;, 1995, &#039;&#039;&#039;117&#039;&#039;&#039;, 1&amp;amp;ndash;19&lt;br /&gt;
:[10] &amp;amp;ndash; W. Humphrey, A. Dalke, K. Schulten, &#039;&#039;J. Molec. Graphics&#039;&#039;, 1996, &#039;&#039;&#039;14&#039;&#039;&#039;, 33&amp;amp;ndash;38&lt;br /&gt;
:[11] &amp;amp;ndash; Python Software Foundation, Python Language Reference, version 3.0. Available at http://www.python.org&lt;br /&gt;
:[12] &amp;amp;ndash; D. G. Henshaw, &#039;&#039;Phys. Rev.&#039;&#039;, 1958, &#039;&#039;&#039;111&#039;&#039;&#039;, 1470&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig. 20, alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 4 &amp;amp;ndash; Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. 20 &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. 21 &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. For a time-step of 0.55 it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. 3), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. The total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1 changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 3 &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695938</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695938"/>
		<updated>2018-03-28T09:34:22Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
Felix Henry Thompson – 00930702 – 28&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; March 2018&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate that Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to be made using calculations taking less than five minutes to complete. This work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Molecular Dynamics was first conceptually described in the 1950s, not seeing general use until the mid-1970s.[@@@50s paper] As a technique, it sought to confront the age-old difficulty of solving the N-body problem &amp;amp;mdash; how could one evaluate how a large system of bodies develops through time? It was the advent of accessible computing which provided the work-power needed to resolve this problem. With modern personal computing power, as well as access to specialised computing facilities, systems containing thousands of bodies can be evaluated, with results being presented in seconds and minutes, rather than weeks and months.[@@@book]&lt;br /&gt;
&lt;br /&gt;
Originally Molecular Dynamics was only being applied to small, well-defined, near-theoretical, systems such as perfect hard-spheres, or point-masses with simplistic interparticle interactions. In stark contrast to this, MD nowadays sees major applications to the dynamics of proteins and other biological systems.[@@@dynamicsoverview] Compared to the original systems, these new ones are full of complex degrees of freedom, huge varieties of interparticle forces, variable responses to potentials, and potentially involving proteins kDa&#039;s in size. This area is of great interest, due to the dynamics of proteins underpinning their biological action. As such, competent understanding of them may allow the directing of new medicines and pharmaceutical techniques.[@@@proteindynamics]&lt;br /&gt;
&lt;br /&gt;
The basic structure of Molecular Dynamics is fairly simplistic in principle &amp;amp;mdash; we evaluate the force on each particle in our system (often neglecting the majority of pair interactions), use that to determine the acceleration, propagate the particles some small distance in time, update the new positions and velocities, and then repeat as needed. There are a wide variety of methodologies that allow one to put this process into practice. The simulations in this work follow the Velocity&amp;amp;ndash;Verlet algorithm, explanations of which can be found [@@@book/swope].&lt;br /&gt;
&lt;br /&gt;
The forces between particles in your system define the properties that system will have. In this work the Lennard-Jones potential is used, defined in Eq. 1.[notes] As such we are modeling the Lennard-Jones fluid, the phase diagram of which is also provided in Fig. 1.[@@@book &amp;amp; its 2 refs] Throughout this work, it is our goal to navigate the thermodynamic properties of this system using the tools of Molecular Dynamics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 1: &amp;lt;math&amp;gt; \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:20180326 145146.svg|600 px|thumb|centre|Fig. 1 &amp;amp;ndash; The phase diagram of the Lennard-Jones fluid]]&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3 or 3.2&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate.&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London. Unless stated otherwise, all reported values are in Lennard-Jones reduced units.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures 1.0, 2.0, 2.6, 3.0, 4.0. Temperatures were set from 1 to 3.5. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. 2. These simulations were performed for the densities 0.2, 0.5, 0.8 the temperature range 1.0&amp;amp;ndash;4.0. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 2: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD, the trajectories were then visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@phasesource), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this, five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. 2 &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. 2 it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. 3&amp;amp;ndash;5 shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 1 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. 3 &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. 4 &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. 5 &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. 6. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. 6 &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. 6 are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. 7. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. 7 &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. 2, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. 8 below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. 8 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. 8 by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. 9 shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. 1, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. 9 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. 10.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. 10 &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give system in the solid, liquid, and vapour phases. The trajectories of these systems were measured, and passed to VMD to allow calculation of the Radial Distribution Fuction g(r) for each system. The integrals of this function were also calculated. The RDF for each phase is given in Figs. 11&amp;amp;ndash;13.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 2 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_rdf.PNG|600 px|thumb|centre|Fig. 11 &amp;amp;ndash; RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_rdf.PNG|600 px|thumb|centre|Fig. 12 &amp;amp;ndash; RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_rdf.PNG|600 px|thumb|centre|Fig. 13 &amp;amp;ndash; RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid is complex, yet well structured. Here each peak corresponds to a lattice point some distance away from another point. The first three peaks are at reduced distances of 1.025, 1.475, and 1.825. Therefore for the argon system these distances correspond to 349, 502, and 620 pm. An experimentally determined lattice parameter for the argon crystal is a=525.6 pm [@@@]. This gives rise to the first three nearest lattice points being &amp;lt;math&amp;gt;\sqrt{2*525.6^2},\ 525.6,\ (525.6^2 + 2(0.5*525.6)^2)^{1/3}&amp;lt;/math&amp;gt;, equal to 372, 526, and 643 pm. These values are approximately equal, varying by ca. 20 pm, demonstrating that the lattice spacings can be approximately determined by evaluating the RDF.&lt;br /&gt;
&lt;br /&gt;
The RDFs for the liquid and vapour phases are similar, they both have a peak at approximately 1&amp;amp;sigma;, they oscillate with a period of 1&amp;amp;sigma;, with the gas RDF decaying much faster. This is explained by the high density of a liquid, meaning that a large number of particles are found within a few &amp;amp;sigma; of each other, whereas a gas is diffuse and therefore has few nearby particles. The peak around 1&amp;amp;sigma; for the gas is explained by the fact that when two gas particles collide, they decelerate before beginning to move away from each other. This results in colliding particles spending a significant amount of time about 1&amp;amp;sigma; apart, giving rise to the aforementioned peak.&lt;br /&gt;
&lt;br /&gt;
The integrals of the RDFs are also included for the three phases as Figs. 14&amp;amp;ndash;16. Here the number integral is given from 0&amp;amp;ndash;7&amp;amp;sigma;. The graphs for the solid and gas appear as expected &amp;amp;mdash; an exponential increase in number integral over distance. The integrals show that the more atoms are present within 10&amp;amp;sigma; for the solid than within the gas, about 5100 &#039;&#039;vs&#039;&#039; 1750. This is just down to the higher density of the solid. The graph for the liquid is more complex, it begins by increasing exponentially, but then begins to tail off after approximately 8&amp;amp;sigma;. This can be explained by a finite size error &amp;amp;mdash; the sphere it is integrating over begins to extend past the walls of the simulation volume, which is approximately 16&amp;amp;sigma; side-to-side&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 3 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_int.PNG|600 px|thumb|centre|Fig. 14 &amp;amp;ndash; Integral of RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_int.PNG|600 px|thumb|centre|Fig. 15 &amp;amp;ndash; Integral of RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_int.PNG|600 px|thumb|centre|Fig. 16 &amp;amp;ndash; Integral of RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase, the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. 17, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. 17 &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. 18&amp;amp;ndash;19.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. 18 &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. 19 &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig. 20, alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 4 &amp;amp;ndash; Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. 20 &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. 21 &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. For a time-step of 0.55 it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. 3), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. The total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1 changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 3 &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discussed in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695924</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695924"/>
		<updated>2018-03-28T09:17:52Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
Felix Henry Thompson – 00930702 – 28&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; March 2018&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate that Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to be made using calculations taking less than five minutes to complete. This work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Molecular Dynamics was first conceptually described in the 1950s, not seeing general use until the mid-1970s.[@@@50s paper] As a technique, it sought to confront the age-old difficulty of solving the N-body problem &amp;amp;mdash; how could one evaluate how a large system of bodies develops through time? It was the advent of accessible computing which provided the work-power needed to resolve this problem. With modern personal computing power, as well as access to specialised computing facilities, systems containing thousands of bodies can be evaluated, with results being presented in seconds and minutes, rather than weeks and months.[@@@book]&lt;br /&gt;
&lt;br /&gt;
Originally Molecular Dynamics was only being applied to small, well-defined, near-theoretical, systems such as perfect hard-spheres, or point-masses with simplistic interparticle interactions. In stark contrast to this, MD nowadays sees major applications to the dynamics of proteins and other biological systems.[@@@dynamicsoverview] Compared to the original systems, these new ones are full of complex degrees of freedom, huge varieties of interparticle forces, variable responses to potentials, and potentially involving proteins kDa&#039;s in size. This area is of great interest, due to the dynamics of proteins underpinning their biological action. As such, competent understanding of them may allow the directing of new medicines and pharmaceutical techniques.[@@@proteindynamics]&lt;br /&gt;
&lt;br /&gt;
The basic structure of Molecular Dynamics is fairly simplistic in principle &amp;amp;mdash; we evaluate the force on each particle in our system (often neglecting the majority of pair interactions), use that to determine the acceleration, propagate the particles some small distance in time, update the new positions and velocities, and then repeat as needed. There are a wide variety of methodologies that allow one to put this process into practice. The simulations in this work follow the Velocity&amp;amp;ndash;Verlet algorithm, explanations of which can be found [@@@book/swope].&lt;br /&gt;
&lt;br /&gt;
The forces between particles in your system define the properties that system will have. In this work the Lennard-Jones potential is used, defined in Eq. 1.[notes] As such we are modeling the Lennard-Jones fluid, the phase diagram of which is also provided in Fig. 1.[@@@book &amp;amp; its 2 refs] Throughout this work, it is our goal to navigate the thermodynamic properties of this system using the tools of Molecular Dynamics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 1: &amp;lt;math&amp;gt; \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:20180326 145146.svg|600 px|thumb|centre|Fig. 1 &amp;amp;ndash; The phase diagram of the Lennard-Jones fluid]]&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3 or 3.2&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate.&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London. Unless stated otherwise, all reported values are in Lennard-Jones reduced units.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures 1.0, 2.0, 2.6, 3.0, 4.0. Temperatures were set from 1 to 3.5. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. 2. These simulations were performed for the densities 0.2, 0.5, 0.8 the temperature range 1.0&amp;amp;ndash;4.0. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. 2: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD, the trajectories were then visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@phasesource), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this, five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. 2 &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. 2 it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. 3&amp;amp;ndash;5 shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table 1 &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. 3 &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. 4 &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. 5 &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. 6. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. 6 &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. 7. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. 7 &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
@@@ error heavy&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. @@@, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. @@@ below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. @@@ by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. @@@ shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. @@@, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give system in the solid, liquid, and vapour phases. The trajectories of these systems was measured, and passed to VMD to allow calculation of the Radial Distribution Fuction g(r) for each system. The integrals of this function were also calculated. The RDF for each phase is given in Figs. @@@&amp;amp;ndash;@@@.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_rdf.PNG|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_rdf.PNG|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_rdf.PNG|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid is complex, yet well structured. Here each peak corresponds to a lattice point some distance away from another point. The first three peaks are at reduced distances of 1.025, 1.475, and 1.825. Therefore for the argon system these distances correspond to 349, 502, and 620 pm. An experimentally determined lattice parameter for the argon crystal is a=525.6 pm [@@@]. This gives rise to the first three nearest lattice points being &amp;lt;math&amp;gt;\sqrt{2*525.6^2},\ 525.6,\ (525.6^2 + 2(0.5*525.6)^2)^{1/3}&amp;lt;/math&amp;gt;, equal to 372, 526, and 643 pm. These values are approximately equal, varying by ca. 20 pm, demonstrating that the lattice spacings can be approximately determined by evaluating the RDF.&lt;br /&gt;
&lt;br /&gt;
The RDFs for the liquid and vapour phases are similar, they both have a peak at approximately 1&amp;amp;sigma;, they oscillate with a period of 1&amp;amp;sigma;, with the gas RDF decaying much faster. This is explained by the high density of a liquid, meaning that a large number of particles are found within a few &amp;amp;sigma; of each other, whereas a gas is diffuse and therefore has few nearby particles. The peak around 1&amp;amp;sigma; for the gas is explained by the fact that when two gas particles collide, they decelerate before beginning to move away from each other. This results in colliding particles spending a significant amount of time about 1&amp;amp;sigma; apart, giving rise to the aforementioned peak.&lt;br /&gt;
&lt;br /&gt;
The integrals of the RDFs are also included for the three phases as Figs. @@@&amp;amp;ndash;@@@. Here the number integral is given from 0&amp;amp;ndash;7&amp;amp;sigma;. The graphs for the solid and gas appear as expected &amp;amp;mdash; an exponential increase in number integral over distance. The integrals show that the more atoms are present within 10&amp;amp;sigma; for the solid than within the gas, about 5100 &#039;&#039;vs&#039;&#039; 1750. This is just down to the higher density of the solid. The graph for the liquid is more complex, it begins by increasing exponentially, but then begins to tail off after approximately 8&amp;amp;sigma;. This can be explained by a finite size error &amp;amp;mdash; the sphere it is integrating over begins to extend past the walls of the simulation volume, which is approximately 16&amp;amp;sigma; side-to-side&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_int.PNG|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Integral of RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_int.PNG|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Integral of RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_int.PNG|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Integral of RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase (@@@), the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s (@@@) diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase (@@@) behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. @@@, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695872</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695872"/>
		<updated>2018-03-28T07:41:52Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Results and Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
Felix Henry Thompson – 00930702 – 28&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; March 2018&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to made using calculations taking less than five minutes. The work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Molecular Dynamics was first conceptually described in the 1950s, not seeing general use until the mid-1970s.[@@@50s paper] As a technique it sought to confront the age-old difficulty of solving the N-body problem &amp;amp;mdash; how could one evaluate how a large system of bodies develops through time? It was the advent of accessible computer which provided the work-power needed to resolve this problem. With modern personal computing power, as well as access to specialised computing facilities, systems containing thousands of bodies can be evaluated, with results being presented in seconds and minutes.[@@@book]&lt;br /&gt;
&lt;br /&gt;
Originally Molecular Dynamics was only being applied to small, well-defined, near-theoretical, systems such as perfect hard-spheres, or point-masses with simplistic interparticle interactions. In stark contrast to this, MD nowadays sees major applications to the dynamics of proteins and other biological systems.[@@@dynamicsoverview] Compared to the original systems, these new ones are full of complex degrees of freedom, huge varieties of interparticle forces, variable responses to potentials, potentially involving proteins kDa&#039;s in size. This area is of great interest, due to the dynamics of proteins underpinning their biological action. As such, competent understanding of them may allow the directing of new medicines and pharmaceutical techniques.[@@@proteindynamics]&lt;br /&gt;
&lt;br /&gt;
The basic structure of Molecular Dynamics is fairly simplistic in principle &amp;amp;mdash; we evaluate the force on each particle in our system (often neglecting the majority of pair interactions), using that to determine the acceleration, propagate the particles some small distance in time, update the new positions and velocities, and then repeat as needed. There are a wide variety of methodologies that allow one to put this process into practice. The simulations in this work follow the Velocity&amp;amp;ndash;Verlet algorithm, explanations of which can be found [@@@book/swope].&lt;br /&gt;
&lt;br /&gt;
The forces between particles in your system define the properties that system will have. In this work the Lennard-Jones potential is used, defined in Eq.@@@.[notes] As such we are modeling the Lennard-Jones fluid, the phase diagram of which is also provided in Fig.@@@.[@@@book &amp;amp; its 2 refs] Throughout this work, it is our goal to navigate the thermodynamic properties of this system using the tools of Molecular Dynamics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt; \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:20180326 145146.svg|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; The phase diagram of the Lennard-Jones fluid]]&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
@@@Prove that Ideal Gas Law consistent with reduced units&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. @@@. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
@@@ error heavy&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. @@@, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. @@@ below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. @@@ by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. @@@ shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. @@@, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give system in the solid, liquid, and vapour phases. The trajectories of these systems was measured, and passed to VMD to allow calculation of the Radial Distribution Fuction g(r) for each system. The integrals of this function were also calculated. The RDF for each phase is given in Figs. @@@&amp;amp;ndash;@@@.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_rdf.PNG|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_rdf.PNG|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_rdf.PNG|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid is complex, yet well structured. Here each peak corresponds to a lattice point some distance away from another point. The first three peaks are at reduced distances of 1.025, 1.475, and 1.825. Therefore for the argon system these distances correspond to 349, 502, and 620 pm. An experimentally determined lattice parameter for the argon crystal is a=525.6 pm [@@@]. This gives rise to the first three nearest lattice points being &amp;lt;math&amp;gt;\sqrt{2*525.6^2},\ 525.6,\ (525.6^2 + 2(0.5*525.6)^2)^{1/3}&amp;lt;/math&amp;gt;, equal to 372, 526, and 643 pm. These values are approximately equal, varying by ca. 20 pm, demonstrating that the lattice spacings can be approximately determined by evaluating the RDF.&lt;br /&gt;
&lt;br /&gt;
The RDFs for the liquid and vapour phases are similar, they both have a peak at approximately 1&amp;amp;sigma;, they oscillate with a period of 1&amp;amp;sigma;, with the gas RDF decaying much faster. This is explained by the high density of a liquid, meaning that a large number of particles are found within a few &amp;amp;sigma; of each other, whereas a gas is diffuse and therefore has few nearby particles. The peak around 1&amp;amp;sigma; for the gas is explained by the fact that when two gas particles collide, they decelerate before beginning to move away from each other. This results in colliding particles spending a significant amount of time about 1&amp;amp;sigma; apart, giving rise to the aforementioned peak.&lt;br /&gt;
&lt;br /&gt;
The integrals of the RDFs are also included for the three phases as Figs. @@@&amp;amp;ndash;@@@. Here the number integral is given from 0&amp;amp;ndash;7&amp;amp;sigma;. The graphs for the solid and gas appear as expected &amp;amp;mdash; an exponential increase in number integral over distance. The integrals show that the more atoms are present within 10&amp;amp;sigma; for the solid than within the gas, about 5100 &#039;&#039;vs&#039;&#039; 1750. This is just down to the higher density of the solid. The graph for the liquid is more complex, it begins by increasing exponentially, but then begins to tail off after approximately 8&amp;amp;sigma;. This can be explained by a finite size error &amp;amp;mdash; the sphere it is integrating over begins to extend past the walls of the simulation volume, which is approximately 16&amp;amp;sigma; side-to-side&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Solid_int.PNG|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Integral of RDF of solid, density=1.2, temperature=1.0]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Liquid_int.PNG|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Integral of RDF of liquid, density=0.8, temperature=1.2]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14Vapour_int.PNG|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Integral of RDF of vapour, density=0.4, temperature=1.8]]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase (@@@), the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s (@@@) diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase (@@@) behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. @@@, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fht14Vapour_rdf.PNG&amp;diff=695871</id>
		<title>File:Fht14Vapour rdf.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fht14Vapour_rdf.PNG&amp;diff=695871"/>
		<updated>2018-03-28T07:41:20Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fht14Vapour_int.PNG&amp;diff=695870</id>
		<title>File:Fht14Vapour int.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fht14Vapour_int.PNG&amp;diff=695870"/>
		<updated>2018-03-28T07:41:03Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fht14Liquid_int.PNG&amp;diff=695869</id>
		<title>File:Fht14Liquid int.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fht14Liquid_int.PNG&amp;diff=695869"/>
		<updated>2018-03-28T07:40:50Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fht14Liquid_rdf.PNG&amp;diff=695868</id>
		<title>File:Fht14Liquid rdf.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fht14Liquid_rdf.PNG&amp;diff=695868"/>
		<updated>2018-03-28T07:39:59Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fht14Solid_int.PNG&amp;diff=695867</id>
		<title>File:Fht14Solid int.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fht14Solid_int.PNG&amp;diff=695867"/>
		<updated>2018-03-28T07:39:41Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fht14Solid_rdf.PNG&amp;diff=695866</id>
		<title>File:Fht14Solid rdf.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fht14Solid_rdf.PNG&amp;diff=695866"/>
		<updated>2018-03-28T07:39:21Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695863</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695863"/>
		<updated>2018-03-28T07:30:56Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Radial Distribution Function for Differing Phases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
Felix Henry Thompson – 00930702 – 28&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; March 2018&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to made using calculations taking less than five minutes. The work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Molecular Dynamics was first conceptually described in the 1950s, not seeing general use until the mid-1970s.[@@@50s paper] As a technique it sought to confront the age-old difficulty of solving the N-body problem &amp;amp;mdash; how could one evaluate how a large system of bodies develops through time? It was the advent of accessible computer which provided the work-power needed to resolve this problem. With modern personal computing power, as well as access to specialised computing facilities, systems containing thousands of bodies can be evaluated, with results being presented in seconds and minutes.[@@@book]&lt;br /&gt;
&lt;br /&gt;
Originally Molecular Dynamics was only being applied to small, well-defined, near-theoretical, systems such as perfect hard-spheres, or point-masses with simplistic interparticle interactions. In stark contrast to this, MD nowadays sees major applications to the dynamics of proteins and other biological systems.[@@@dynamicsoverview] Compared to the original systems, these new ones are full of complex degrees of freedom, huge varieties of interparticle forces, variable responses to potentials, potentially involving proteins kDa&#039;s in size. This area is of great interest, due to the dynamics of proteins underpinning their biological action. As such, competent understanding of them may allow the directing of new medicines and pharmaceutical techniques.[@@@proteindynamics]&lt;br /&gt;
&lt;br /&gt;
The basic structure of Molecular Dynamics is fairly simplistic in principle &amp;amp;mdash; we evaluate the force on each particle in our system (often neglecting the majority of pair interactions), using that to determine the acceleration, propagate the particles some small distance in time, update the new positions and velocities, and then repeat as needed. There are a wide variety of methodologies that allow one to put this process into practice. The simulations in this work follow the Velocity&amp;amp;ndash;Verlet algorithm, explanations of which can be found [@@@book/swope].&lt;br /&gt;
&lt;br /&gt;
The forces between particles in your system define the properties that system will have. In this work the Lennard-Jones potential is used, defined in Eq.@@@.[notes] As such we are modeling the Lennard-Jones fluid, the phase diagram of which is also provided in Fig.@@@.[@@@book &amp;amp; its 2 refs] Throughout this work, it is our goal to navigate the thermodynamic properties of this system using the tools of Molecular Dynamics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt; \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:20180326 145146.svg|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; The phase diagram of the Lennard-Jones fluid]]&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
@@@Prove that Ideal Gas Law consistent with reduced units&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. @@@. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
@@@ error heavy&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. @@@, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. @@@ below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. @@@ by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. @@@ shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. @@@, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give system in the solid, liquid, and vapour phases. The trajectories of these systems was measured, and passed to VMD to allow calculation of the Radial Distribution Fuction g(r) for each system. The integrals of this function were also calculated. The RDF for each phase is given in Figs. @@@&amp;amp;ndash;@@@. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid is complex, yet well structured. Here each peak corresponds to a lattice point some distance away from another point. The first three peaks are at reduced distances of 1.025, 1.475, and 1.825. Therefore for the argon system these distances correspond to 349, 502, and 620 pm. An experimentally determined lattice parameter for the argon crystal is a=525.6 pm [@@@]. This gives rise to the first three nearest lattice points being &amp;lt;math&amp;gt;\sqrt{2*525.6^2},\ 525.6,\ (525.6^2 + 2(0.5*525.6)^2)^{1/3}&amp;lt;/math&amp;gt;, equal to 372, 526, and 643 pm. These values are approximately equal, varying by ca. 20 pm, demonstrating that the lattice spacings can be approximately determined by evaluating the RDF.&lt;br /&gt;
&lt;br /&gt;
The RDFs for the liquid and vapour phases are similar, they both have a peak at approximately 1&amp;amp;sigma;, they oscillate with a period of 1&amp;amp;sigma;, with the gas RDF decaying much faster. This is explained by the high density of a liquid, meaning that a large number of particles are found within a few &amp;amp;sigma; of each other, whereas a gas is diffuse and therefore has few nearby particles. The peak around 1&amp;amp;sigma; for the gas is explained by the fact that when two gas particles collide, they decelerate before beginning to move away from each other. This results in colliding particles spending a significant amount of time about 1&amp;amp;sigma; apart, giving rise to the aforementioned peak.&lt;br /&gt;
&lt;br /&gt;
The integrals of the RDFs are also included for the three phases as Figs. @@@&amp;amp;ndash;@@@. Here the number integral is given from 0&amp;amp;ndash;7&amp;amp;sigma;. The graphs for the solid and gas appear as expected &amp;amp;mdash; an exponential increase in number integral over distance. The integrals show that the more atoms are present within 10&amp;amp;sigma; for the solid than within the gas, about 5100 &#039;&#039;vs&#039;&#039; 1750. This is just down to the higher density of the solid. The graph for the liquid is more complex, it begins by increasing exponentially, but then begins to tail off after approximately 8&amp;amp;sigma;. This can be explained by a finite size error &amp;amp;mdash; the sphere it is integrating over begins to extend past the walls of the simulation volume, which is approximately 16&amp;amp;sigma; side-to-side&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase (@@@), the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s (@@@) diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase (@@@) behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. @@@, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695862</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695862"/>
		<updated>2018-03-28T07:29:44Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Results and Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
Felix Henry Thompson – 00930702 – 28&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; March 2018&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to made using calculations taking less than five minutes. The work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Molecular Dynamics was first conceptually described in the 1950s, not seeing general use until the mid-1970s.[@@@50s paper] As a technique it sought to confront the age-old difficulty of solving the N-body problem &amp;amp;mdash; how could one evaluate how a large system of bodies develops through time? It was the advent of accessible computer which provided the work-power needed to resolve this problem. With modern personal computing power, as well as access to specialised computing facilities, systems containing thousands of bodies can be evaluated, with results being presented in seconds and minutes.[@@@book]&lt;br /&gt;
&lt;br /&gt;
Originally Molecular Dynamics was only being applied to small, well-defined, near-theoretical, systems such as perfect hard-spheres, or point-masses with simplistic interparticle interactions. In stark contrast to this, MD nowadays sees major applications to the dynamics of proteins and other biological systems.[@@@dynamicsoverview] Compared to the original systems, these new ones are full of complex degrees of freedom, huge varieties of interparticle forces, variable responses to potentials, potentially involving proteins kDa&#039;s in size. This area is of great interest, due to the dynamics of proteins underpinning their biological action. As such, competent understanding of them may allow the directing of new medicines and pharmaceutical techniques.[@@@proteindynamics]&lt;br /&gt;
&lt;br /&gt;
The basic structure of Molecular Dynamics is fairly simplistic in principle &amp;amp;mdash; we evaluate the force on each particle in our system (often neglecting the majority of pair interactions), using that to determine the acceleration, propagate the particles some small distance in time, update the new positions and velocities, and then repeat as needed. There are a wide variety of methodologies that allow one to put this process into practice. The simulations in this work follow the Velocity&amp;amp;ndash;Verlet algorithm, explanations of which can be found [@@@book/swope].&lt;br /&gt;
&lt;br /&gt;
The forces between particles in your system define the properties that system will have. In this work the Lennard-Jones potential is used, defined in Eq.@@@.[notes] As such we are modeling the Lennard-Jones fluid, the phase diagram of which is also provided in Fig.@@@.[@@@book &amp;amp; its 2 refs] Throughout this work, it is our goal to navigate the thermodynamic properties of this system using the tools of Molecular Dynamics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt; \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:20180326 145146.svg|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; The phase diagram of the Lennard-Jones fluid]]&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
@@@Prove that Ideal Gas Law consistent with reduced units&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. @@@. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
@@@ error heavy&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. @@@, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. @@@ below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. @@@ by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. @@@ shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. @@@, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give system in the solid, liquid, and vapour phases. The trajectories of these systems was measured, and passed to VMD to allow calculation of the Radial Distribution Fuction g(r) for each system. The integrals of this function were also calculated. The RDF for each phase is given in Figs. @@@&amp;amp;ndash;@@@. &lt;br /&gt;
&lt;br /&gt;
The RDF for the solid is complex, yet well structured. Here each peak corresponds to a lattice point some distance away from another point. The first three peaks are at reduced distances of 1.025, 1.475, and 1.825. Therefore for the argon system these distances correspond to 349, 502, and 620 pm. An experimentally determined lattice parameter for the argon crystal is a=525.6 pm [@@@]. This gives rise to the first three nearest lattice points being &amp;lt;math&amp;gt;\sqrt{2*525.6^2),\ 525.6,\ (525.6^2 + 2(0.5*525.6)^2)^{1/3}&amp;lt;/math&amp;gt;, equal to 372, 526, and 643 pm. These values are approximately equal, varying by ca. 20 pm, demonstrating that the lattice spacings can be approximately determined by evaluating the RDF.&lt;br /&gt;
&lt;br /&gt;
The RDFs for the liquid and vapour phases are similar, they both have a peak at approximately 1&amp;amp;sigma;, they oscillate with a period of 1&amp;amp;sigma;, with the gas RDF decaying much faster. This is explained by the high density of a liquid, meaning that a large number of particles are found within a few &amp;amp;sigma; of each other, whereas a gas is diffuse and therefore has few nearby particles. The peak around 1&amp;amp;sigma; for the gas is explained by the fact that when two gas particles collide, they decelerate before beginning to move away from each other. This results in colliding particles spending a significant amount of time about 1&amp;amp;sigma; apart, giving rise to the aforementioned peak.&lt;br /&gt;
&lt;br /&gt;
The integrals of the RDFs are also included for the three phases as Figs. @@@&amp;amp;ndash;@@@. Here the number integral is given from 0&amp;amp;ndash;7&amp;amp;sigma;. The graphs for the solid and gas appear as expected &amp;amp;mdash; an exponential increase in number integral over distance. The integrals show that the more atoms are present within 10&amp;amp;sigma; for the solid than within the gas, about 5100 &#039;&#039;vs&#039;&#039; 1750. This is just down to the higher density of the solid. The graph for the liquid is more complex, it begins by increasing exponentially, but then begins to tail off after approximately 8&amp;amp;sigma;. This can be explained by a finite size error &amp;amp;mdash; the sphere it is integrating over begins to extend past the walls of the simulation volume, which is approximately 16&amp;amp;sigma; side-to-side&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase (@@@), the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s (@@@) diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase (@@@) behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. @@@, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695837</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695837"/>
		<updated>2018-03-28T05:34:24Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
Felix Henry Thompson – 00930702 – 28&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; March 2018&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to made using calculations taking less than five minutes. The work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Molecular Dynamics was first conceptually described in the 1950s, not seeing general use until the mid-1970s.[@@@50s paper] As a technique it sought to confront the age-old difficulty of solving the N-body problem &amp;amp;mdash; how could one evaluate how a large system of bodies develops through time? It was the advent of accessible computer which provided the work-power needed to resolve this problem. With modern personal computing power, as well as access to specialised computing facilities, systems containing thousands of bodies can be evaluated, with results being presented in seconds and minutes.[@@@book]&lt;br /&gt;
&lt;br /&gt;
Originally Molecular Dynamics was only being applied to small, well-defined, near-theoretical, systems such as perfect hard-spheres, or point-masses with simplistic interparticle interactions. In stark contrast to this, MD nowadays sees major applications to the dynamics of proteins and other biological systems.[@@@dynamicsoverview] Compared to the original systems, these new ones are full of complex degrees of freedom, huge varieties of interparticle forces, variable responses to potentials, potentially involving proteins kDa&#039;s in size. This area is of great interest, due to the dynamics of proteins underpinning their biological action. As such, competent understanding of them may allow the directing of new medicines and pharmaceutical techniques.[@@@proteindynamics]&lt;br /&gt;
&lt;br /&gt;
The basic structure of Molecular Dynamics is fairly simplistic in principle &amp;amp;mdash; we evaluate the force on each particle in our system (often neglecting the majority of pair interactions), using that to determine the acceleration, propagate the particles some small distance in time, update the new positions and velocities, and then repeat as needed. There are a wide variety of methodologies that allow one to put this process into practice. The simulations in this work follow the Velocity&amp;amp;ndash;Verlet algorithm, explanations of which can be found [@@@book/swope].&lt;br /&gt;
&lt;br /&gt;
The forces between particles in your system define the properties that system will have. In this work the Lennard-Jones potential is used, defined in Eq.@@@.[notes] As such we are modeling the Lennard-Jones fluid, the phase diagram of which is also provided in Fig.@@@.[@@@book &amp;amp; its 2 refs] Throughout this work, it is our goal to navigate the thermodynamic properties of this system using the tools of Molecular Dynamics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt; \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:20180326 145146.svg|600 px|thumb|centre|Fig. @@@ &amp;amp;ndash; The phase diagram of the Lennard-Jones fluid]]&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
@@@Prove that Ideal Gas Law consistent with reduced units&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. @@@. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
@@@ error heavy&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. @@@, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. @@@ below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. @@@ by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. @@@ shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. @@@, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase (@@@), the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s (@@@) diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase (@@@) behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. @@@, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695835</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695835"/>
		<updated>2018-03-28T05:27:37Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
Felix Henry Thompson – 00930702 – 28&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; March 2018&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to made using calculations taking less than five minutes. The work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Molecular Dynamics was first conceptually described in the 1950s, not seeing general use until the mid-1970s.[@@@] As a technique it sought to confront the age-old difficulty of solving the N-body problem &amp;amp;mdash; how could one evaluate how a large system of bodies develops through time? It was the advent of accessible computer which provided the work-power needed to resolve this problem. With modern personal computing power, as well as access to specialised computing facilities, systems containing thousands of bodies can be evaluated, with results being presented in seconds and minutes.&lt;br /&gt;
&lt;br /&gt;
Originally Molecular Dynamics was only being applied to small, well-defined, near-theoretical, systems such as perfect hard-spheres, or point-masses with simplistic interparticle interactions. In stark contrast to this, MD nowadays sees major applications to the dynamics of proteins and other biological systems. Compared to the original systems, these new ones are full of complex degrees of freedom, huge varieties of interparticle forces, variable responses to potentials, potentially involving proteins kDa&#039;s in size. This area is of great interest, due to the dynamics of proteins underpinning their biological action. As such, competent understanding of them may allow the directing of new medicines and pharmaceutical techniques.&lt;br /&gt;
&lt;br /&gt;
The basic structure of Molecular Dynamics is fairly simplistic in principle &amp;amp;mdash; we evaluate the force on each particle in our system (often neglecting the majority of pair interactions), using that to determine the acceleration, propagate the particles some small distance in time, update the new positions and velocities, and then repeat as needed. There are a wide variety of methodologies that allow one to put this process into practice. The simulations in this work follow the Velocity&amp;amp;ndash;Verlet algorithm, explanations of which can be found [@@@].&lt;br /&gt;
&lt;br /&gt;
The forces between particles in your system define the properties that system will have. In this work the Lennard-Jones potential is used, defined in Eq.@@@. As such we are modeling the Lennard-Jones fluid, the phase diagram of which is also provided in Fig.@@@. Throughout this work, it is our goal to navigate the thermodynamic properties of this system using the tools of Molecular Dynamics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt; \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:20180326 145146.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; The phase diagram of the Lennard-Jones fluid]]&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
@@@Prove that Ideal Gas Law consistent with reduced units&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. @@@. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
@@@ error heavy&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. @@@, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. @@@ below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. @@@ by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. @@@ shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. @@@, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase (@@@), the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s (@@@) diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase (@@@) behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. @@@, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695829</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695829"/>
		<updated>2018-03-28T04:22:59Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to made using calculations taking less than five minutes. The work also demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conceptual introduction to Molecular Dynamics. Classical approximation-&amp;gt;velocity verlet. Lennard&amp;amp;ndash;Jones overview. Prediction of properties.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
@@@Prove that Ideal Gas Law consistent with reduced units&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. @@@. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
@@@ error heavy&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. @@@, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. @@@ below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. @@@ by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. @@@ shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. @@@, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase (@@@), the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s (@@@) diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase (@@@) behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. @@@, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695828</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695828"/>
		<updated>2018-03-28T04:21:05Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
This work sought to demonstrate Molecular Dynamics calculations on medium-sized (4000 atom) systems could provide the quick determination of various thermodynamic trends present in the Lennard-Jones fluid. Overall this attempt was successful, demonstrations of system equilibration, gas density, heat capacity, and diffusivity, were all able to made using calculations taking less than five minutes. The work demonstrates the effect of time-step and system size on the precision and stability of computed values.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conceptual introduction to Molecular Dynamics. Classical approximation-&amp;gt;velocity verlet. Lennard&amp;amp;ndash;Jones overview. Prediction of properties.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
@@@Prove that Ideal Gas Law consistent with reduced units&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. @@@. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
@@@ error heavy&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. @@@, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. @@@ below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. @@@ by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. @@@ shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. @@@, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase (@@@), the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s (@@@) diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase (@@@) behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. @@@, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 8000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Diffusivity for the 1000000 atom solid/liquid/vapour phases]]&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Msd3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Comparing the diffusivity for the solid/liquid phases of the two systems]]&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14Msd3.svg&amp;diff=695827</id>
		<title>File:FHT14Msd3.svg</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14Msd3.svg&amp;diff=695827"/>
		<updated>2018-03-28T04:17:03Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14Msd2.svg&amp;diff=695826</id>
		<title>File:FHT14Msd2.svg</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14Msd2.svg&amp;diff=695826"/>
		<updated>2018-03-28T04:16:06Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14Msd.svg&amp;diff=695825</id>
		<title>File:FHT14Msd.svg</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14Msd.svg&amp;diff=695825"/>
		<updated>2018-03-28T04:15:03Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695824</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695824"/>
		<updated>2018-03-28T04:06:31Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Description of general investigation, some key observations to demonstrate that it was successful (it was right?)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conceptual introduction to Molecular Dynamics. Classical approximation-&amp;gt;velocity verlet. Lennard&amp;amp;ndash;Jones overview. Prediction of properties.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
@@@Prove that Ideal Gas Law consistent with reduced units&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. @@@. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
@@@ error heavy&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. @@@, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. @@@ below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. @@@ by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. @@@ shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. @@@, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase (@@@), the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s (@@@) diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase (@@@) behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. @@@, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. @@@.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Overall this work well represents an introduction into the modeling of thermodynamic trends for the Lennard-Jones fluid by using Molecular Dynamics. The calculations contained herein required little time in both their formulation and completion, rendering these simulations viable methods for quickly sketching out key thermodynamic features. Molecular Dynamics calculations have proven themselves suitable methods for simulating across a variety of phases, as well as showing the expected shifts in properties as the system transitions between phases. For more accurate versions of the above calculations, decreasing the time-step and increasing the size of the system would suffice, but the work of this report demonstrate that even with relatively small systems (3000 atoms), key properties and trends can be determined with ease.&lt;br /&gt;
&lt;br /&gt;
It would be of interest to further examine exactly how far these calculation methodologies can take us in describing the Lennard-Jones fluid. Quantitatively mapping out the phases of the Lennard-Jones temperature-density space would be a strong demonstration of this methods ability to describe phase transitions as well as the phase-coexistence regions, with time-constraints not allowing such an attempt at present. Little attempt has been made in this work to compare the results of calculations with physical experimental results, which is ultimately the real test of a simulation&#039;s capabilities. Work should also be completed to compare the capabilities of the Lennard-Jones force field with those of more recent models. &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are listed below, with those not discussed in the main body of this report gone into detail below. Areas where attention has been paid in the main body are not discussed below, so as to avoid unnecessary duplication of statements. &lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695822</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695822"/>
		<updated>2018-03-28T03:39:27Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Results and Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
&lt;br /&gt;
So in generla this is going to be about modelling the thermodynamic and structural (?) properties of a material across multiple phases. It works up from 1) equilibrating the simulation of a melted crystal, to 2) density across different pressure/temperatures, to 3) heat capacity at different density/temperatures, to 4) rdfs (ie. structure) of diff phases, and 5) MSD of diff phases.&lt;br /&gt;
&lt;br /&gt;
1) Discussion of equilibration wrt timestep&lt;br /&gt;
&lt;br /&gt;
2) Ie density increases with temperature. Only asked to do &amp;gt;1.5T, would be nice to see some phase transitions -- fluid-&amp;gt;vapour/liquid, fluid-&amp;gt;liquid, fluid-&amp;gt;solid/liquid, fluid-&amp;gt;solid/liquid-&amp;gt;solid?&lt;br /&gt;
&lt;br /&gt;
3) This tails off. Demonstrate &amp;amp; determine why so weird for D1x3 (maybe weird solid/liquid?)&lt;br /&gt;
&lt;br /&gt;
4) S/L/G -&amp;gt; do for mixed phases too. Also show change in density/temp for a single phase.&lt;br /&gt;
&lt;br /&gt;
5) Same as 4)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Description of general investigation, some key observations to demonstrate that it was successful (it was right?)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conceptual introduction to Molecular Dynamics. Classical approximation-&amp;gt;velocity verlet. Lennard&amp;amp;ndash;Jones overview. Prediction of properties.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
@@@Prove that Ideal Gas Law consistent with reduced units&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. @@@. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
@@@ error heavy&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. @@@, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. @@@ below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. @@@ by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. @@@ shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. @@@, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
=== Radial Distribution Function for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement for Differing Phases ===&lt;br /&gt;
&lt;br /&gt;
Here temperatures and densities were selected to give systems in the solid, liquid, and vapour phases. On these systems the Mean Squared Displacement was calculated. From this data a value for the diffusion coefficient was calculated between each adjacent pair of values. From this the development of the diffusion coefficient over time could be analysed.&lt;br /&gt;
&lt;br /&gt;
For the solid phase (@@@), the diffusivity initially oscillates significantly about zero, before converging to it. The liquid phase&#039;s (@@@) diffusivity initially climbs rapidly, before roughly plateauing out after 30&amp;amp;ndash;40 time-steps. The gas phase (@@@) behaves similarly, but takes longer to plateau, and reaches a higher value. These three systems, shown in Fig. @@@, although leveling out, continue to have significant deviations at the end of the simulation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similar analysis was performed on a provided set of data for systems containing approximately 1000000 atoms, compared to the above 8000 atom systems. Here identical trends are seen in the general shape for each phase, with the curves being significantly smoother and less erratic. The exception is that the gas phase does has not plateaued after 5000 steps, and is still increasing &amp;amp;mdash; albeit at a decreasing rate. These trends are shown in Figs. @@@.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the solid phase we expect the diffusivity to eventually settle to zero, as the system arranges itself into a perfect crystalline lattice. In a perfect lattice, comprised of only a single atom type, there can be no diffusion. As such the diffusivity is zero. For the liquid and gas phases, the systems originally start on lattice points, but then are free to move about and equilibrate as fluids. Atoms in a liquid move more slowly and are closer together, so the system equilibrates faster than a gas. Our smaller gas system equilibrates faster than the larger gas system, likely due to it being faster to distribute energy (and therefore equilibrate) across a smaller system. Obviously the diffusivity is larger for a gas than a liquid due to the atoms moving faster with less hindrance on their motion.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Was it effective? &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Bork&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
Unsure if needed. Perhaps just some less useful graphs + some data files?&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are mentioned below, even if already discussed above in the main body&lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695809</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695809"/>
		<updated>2018-03-28T01:40:18Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Calculating Heat Capacity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
&lt;br /&gt;
So in generla this is going to be about modelling the thermodynamic and structural (?) properties of a material across multiple phases. It works up from 1) equilibrating the simulation of a melted crystal, to 2) density across different pressure/temperatures, to 3) heat capacity at different density/temperatures, to 4) rdfs (ie. structure) of diff phases, and 5) MSD of diff phases.&lt;br /&gt;
&lt;br /&gt;
1) Discussion of equilibration wrt timestep&lt;br /&gt;
&lt;br /&gt;
2) Ie density increases with temperature. Only asked to do &amp;gt;1.5T, would be nice to see some phase transitions -- fluid-&amp;gt;vapour/liquid, fluid-&amp;gt;liquid, fluid-&amp;gt;solid/liquid, fluid-&amp;gt;solid/liquid-&amp;gt;solid?&lt;br /&gt;
&lt;br /&gt;
3) This tails off. Demonstrate &amp;amp; determine why so weird for D1x3 (maybe weird solid/liquid?)&lt;br /&gt;
&lt;br /&gt;
4) S/L/G -&amp;gt; do for mixed phases too. Also show change in density/temp for a single phase.&lt;br /&gt;
&lt;br /&gt;
5) Same as 4)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Description of general investigation, some key observations to demonstrate that it was successful (it was right?)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conceptual introduction to Molecular Dynamics. Classical approximation-&amp;gt;velocity verlet. Lennard&amp;amp;ndash;Jones overview. Prediction of properties.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
@@@Prove that Ideal Gas Law consistent with reduced units&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. @@@. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
@@@ error heavy&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. @@@, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. @@@ below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. @@@ by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. @@@ shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. @@@, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
It is noted that as density increases the apparent error in &amp;lt;math&amp;gt;C_V/V&amp;lt;/math&amp;gt; increases as well. This will likely be a result of errors propagating from the velocity into the total energy, which itself is magnified in the calculation of &amp;lt;math&amp;gt;C_V&amp;lt;/math&amp;gt;, which also involves the error in temperature as well. This high error is typified in an attempt to analyse the number density = 1.3 system, shown in Fig. @@@.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt3.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, the enormous error in heat capacity is shown for the density = 1.3 system]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Was it effective? &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Bork&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
Unsure if needed. Perhaps just some less useful graphs + some data files?&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are mentioned below, even if already discussed above in the main body&lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14Cvt3.svg&amp;diff=695807</id>
		<title>File:FHT14Cvt3.svg</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14Cvt3.svg&amp;diff=695807"/>
		<updated>2018-03-28T01:39:37Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695805</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695805"/>
		<updated>2018-03-28T01:33:20Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Results and Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
&lt;br /&gt;
So in generla this is going to be about modelling the thermodynamic and structural (?) properties of a material across multiple phases. It works up from 1) equilibrating the simulation of a melted crystal, to 2) density across different pressure/temperatures, to 3) heat capacity at different density/temperatures, to 4) rdfs (ie. structure) of diff phases, and 5) MSD of diff phases.&lt;br /&gt;
&lt;br /&gt;
1) Discussion of equilibration wrt timestep&lt;br /&gt;
&lt;br /&gt;
2) Ie density increases with temperature. Only asked to do &amp;gt;1.5T, would be nice to see some phase transitions -- fluid-&amp;gt;vapour/liquid, fluid-&amp;gt;liquid, fluid-&amp;gt;solid/liquid, fluid-&amp;gt;solid/liquid-&amp;gt;solid?&lt;br /&gt;
&lt;br /&gt;
3) This tails off. Demonstrate &amp;amp; determine why so weird for D1x3 (maybe weird solid/liquid?)&lt;br /&gt;
&lt;br /&gt;
4) S/L/G -&amp;gt; do for mixed phases too. Also show change in density/temp for a single phase.&lt;br /&gt;
&lt;br /&gt;
5) Same as 4)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Description of general investigation, some key observations to demonstrate that it was successful (it was right?)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conceptual introduction to Molecular Dynamics. Classical approximation-&amp;gt;velocity verlet. Lennard&amp;amp;ndash;Jones overview. Prediction of properties.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
@@@Prove that Ideal Gas Law consistent with reduced units&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. @@@. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
@@@ error heavy&lt;br /&gt;
&lt;br /&gt;
Here the volume-specific heat capacity, calculated &#039;&#039;via&#039;&#039; Eq. @@@, was determined for three reduced number densities 0.2&amp;amp;ndash;0.8, over the reduced temperature range 1&amp;amp;ndash;4. Fig. @@@ below shows the volume-specific heat capacity (normalised by dividing by the volume of the simulation cell) over the later temperatures, 2&amp;amp;ndash;4. Here all three different densities are in the supercritical fluid phase, with the lowest density fluid having the lowest heat capacity, and all show the trend of decreasing normalised volume-specific heat capacity with increasing temperature. The former can be justified by the fact that it is easiest to change the temperature of a low density material &amp;amp;ndash; there is less matter to absorb energy. The latter trend could be thought of as being due to each fluid becoming less dense with increasing temperature, but by looking back to the ideal gas we can picture this differently.&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt1.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the fluids&#039; heat capacities appear to be decreasing to a common point]]&lt;br /&gt;
&lt;br /&gt;
Heat capacity is related to the gradient of the internal energy &#039;&#039;vs&#039;&#039; temperature diagram. As the fluids become hotter and hotter, they also become less dense. We remember from earlier that hot, low-density gasses have properties that approximate the ideal gas. The internal energy of an ideal gas is singularly defined as &amp;lt;math&amp;gt;\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;, making its increase linear with respect to temperature. As such the internal energy &#039;&#039;vs&#039;&#039; temperature gradient move closer and closer to a constant value (&amp;lt;math&amp;gt;&amp;lt;math&amp;gt;\frac{3}{2}Nk_B&amp;lt;/math&amp;gt;) as the fluid approaches ideal behavior, shown in Fig. @@@ by the lines all decreasing and beginning to plateau off.&lt;br /&gt;
&lt;br /&gt;
Fig. @@@ shows the earlier temperature range, 1&amp;amp;ndash;1.3. Here the 0.8 density plot remains reasonably level compared to the other two densities. Their heat capacities increase rapidly below approximately 1.2 reduced temperature units. Looking back at the Lennard-Jones phase diagram in Fig. @@@, this is clearly due to their transitioning into the vapour-liquid coexistence phase &amp;amp;mdash; the heat capacity of a liquid being much higher than a gas. @@@ source?&lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Cvt2.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Normalised volume-specific heat capacity &#039;&#039;vs&#039;&#039; temperature, here the two lower density fluids transition to the vapour-liquid phase, with a corresponding change in thermodynamic properties]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Was it effective? &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Bork&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
Unsure if needed. Perhaps just some less useful graphs + some data files?&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are mentioned below, even if already discussed above in the main body&lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14Cvt2.svg&amp;diff=695804</id>
		<title>File:FHT14Cvt2.svg</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14Cvt2.svg&amp;diff=695804"/>
		<updated>2018-03-28T01:33:13Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14Cvt1.svg&amp;diff=695803</id>
		<title>File:FHT14Cvt1.svg</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14Cvt1.svg&amp;diff=695803"/>
		<updated>2018-03-28T01:32:48Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695796</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695796"/>
		<updated>2018-03-28T00:57:36Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Results and Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
&lt;br /&gt;
So in generla this is going to be about modelling the thermodynamic and structural (?) properties of a material across multiple phases. It works up from 1) equilibrating the simulation of a melted crystal, to 2) density across different pressure/temperatures, to 3) heat capacity at different density/temperatures, to 4) rdfs (ie. structure) of diff phases, and 5) MSD of diff phases.&lt;br /&gt;
&lt;br /&gt;
1) Discussion of equilibration wrt timestep&lt;br /&gt;
&lt;br /&gt;
2) Ie density increases with temperature. Only asked to do &amp;gt;1.5T, would be nice to see some phase transitions -- fluid-&amp;gt;vapour/liquid, fluid-&amp;gt;liquid, fluid-&amp;gt;solid/liquid, fluid-&amp;gt;solid/liquid-&amp;gt;solid?&lt;br /&gt;
&lt;br /&gt;
3) This tails off. Demonstrate &amp;amp; determine why so weird for D1x3 (maybe weird solid/liquid?)&lt;br /&gt;
&lt;br /&gt;
4) S/L/G -&amp;gt; do for mixed phases too. Also show change in density/temp for a single phase.&lt;br /&gt;
&lt;br /&gt;
5) Same as 4)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Description of general investigation, some key observations to demonstrate that it was successful (it was right?)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conceptual introduction to Molecular Dynamics. Classical approximation-&amp;gt;velocity verlet. Lennard&amp;amp;ndash;Jones overview. Prediction of properties.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
@@@Prove that Ideal Gas Law consistent with reduced units&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. @@@. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
=== Calculating Heat Capacity ===&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Was it effective? &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Bork&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
Unsure if needed. Perhaps just some less useful graphs + some data files?&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are mentioned below, even if already discussed above in the main body&lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695793</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695793"/>
		<updated>2018-03-28T00:12:49Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Results and Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
&lt;br /&gt;
So in generla this is going to be about modelling the thermodynamic and structural (?) properties of a material across multiple phases. It works up from 1) equilibrating the simulation of a melted crystal, to 2) density across different pressure/temperatures, to 3) heat capacity at different density/temperatures, to 4) rdfs (ie. structure) of diff phases, and 5) MSD of diff phases.&lt;br /&gt;
&lt;br /&gt;
1) Discussion of equilibration wrt timestep&lt;br /&gt;
&lt;br /&gt;
2) Ie density increases with temperature. Only asked to do &amp;gt;1.5T, would be nice to see some phase transitions -- fluid-&amp;gt;vapour/liquid, fluid-&amp;gt;liquid, fluid-&amp;gt;solid/liquid, fluid-&amp;gt;solid/liquid-&amp;gt;solid?&lt;br /&gt;
&lt;br /&gt;
3) This tails off. Demonstrate &amp;amp; determine why so weird for D1x3 (maybe weird solid/liquid?)&lt;br /&gt;
&lt;br /&gt;
4) S/L/G -&amp;gt; do for mixed phases too. Also show change in density/temp for a single phase.&lt;br /&gt;
&lt;br /&gt;
5) Same as 4)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Description of general investigation, some key observations to demonstrate that it was successful (it was right?)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conceptual introduction to Molecular Dynamics. Classical approximation-&amp;gt;velocity verlet. Lennard&amp;amp;ndash;Jones overview. Prediction of properties.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. The simulated density is lower than the Ideal Gas Law, likely due to the simulation including interparticle interactions &amp;amp;mdash; the Lennard-Jones potential largely prevents two particles from being less than 1&amp;amp;sigma; apart, whereas in the Ideal Gas Law particles are assumed to not interact and therefore can get as close together as needed. It is noted that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. @@@. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Was it effective? &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Bork&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
Unsure if needed. Perhaps just some less useful graphs + some data files?&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are mentioned below, even if already discussed above in the main body&lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695792</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695792"/>
		<updated>2018-03-27T23:45:17Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Results and Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
&lt;br /&gt;
So in generla this is going to be about modelling the thermodynamic and structural (?) properties of a material across multiple phases. It works up from 1) equilibrating the simulation of a melted crystal, to 2) density across different pressure/temperatures, to 3) heat capacity at different density/temperatures, to 4) rdfs (ie. structure) of diff phases, and 5) MSD of diff phases.&lt;br /&gt;
&lt;br /&gt;
1) Discussion of equilibration wrt timestep&lt;br /&gt;
&lt;br /&gt;
2) Ie density increases with temperature. Only asked to do &amp;gt;1.5T, would be nice to see some phase transitions -- fluid-&amp;gt;vapour/liquid, fluid-&amp;gt;liquid, fluid-&amp;gt;solid/liquid, fluid-&amp;gt;solid/liquid-&amp;gt;solid?&lt;br /&gt;
&lt;br /&gt;
3) This tails off. Demonstrate &amp;amp; determine why so weird for D1x3 (maybe weird solid/liquid?)&lt;br /&gt;
&lt;br /&gt;
4) S/L/G -&amp;gt; do for mixed phases too. Also show change in density/temp for a single phase.&lt;br /&gt;
&lt;br /&gt;
5) Same as 4)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Description of general investigation, some key observations to demonstrate that it was successful (it was right?)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conceptual introduction to Molecular Dynamics. Classical approximation-&amp;gt;velocity verlet. Lennard&amp;amp;ndash;Jones overview. Prediction of properties.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14P2x6_Temperature_vs_Density.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
Also plotted in Fig. @@@ are the Ideal Gas Law predictions of the number density for the two lowest pressures, 2.0 and 1.0. The higher pressure attempt does not fit well to the calculated data, largely sitting more than 50% above it. The lower pressure attempt shows the same shape in temperature response, but again sits some distance above the calculated data. It is noted that this shows that the calculated data better approached the Ideal Gas Law at low pressure and high temperature, the same conditions at which the law is most applicable. To further demonstrate this relation, calculations were performed at a significantly lower pressure: 0.1 reduced pressure units. This data is compared to the corresponding Ideal Gas Law prediction, as well as the 1.0 pressure data from the previous figure, in Fig. @@@. Here the data well matches the Ideal Gas Law. The calculation also better shows the effect of crossing the critical temperature &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1.5, where the number density suddenly increases significantly, as well as the standard error in density. This effect is due to the system moving from the fluid phase to the liquid phase. &lt;br /&gt;
&lt;br /&gt;
[[File:FHT14Lowpressurefit.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature for low pressure fluid, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Was it effective? &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Bork&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
Unsure if needed. Perhaps just some less useful graphs + some data files?&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are mentioned below, even if already discussed above in the main body&lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14Lowpressurefit.svg&amp;diff=695791</id>
		<title>File:FHT14Lowpressurefit.svg</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14Lowpressurefit.svg&amp;diff=695791"/>
		<updated>2018-03-27T23:44:57Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14P2x6_Temperature_vs_Density.svg&amp;diff=695790</id>
		<title>File:FHT14P2x6 Temperature vs Density.svg</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14P2x6_Temperature_vs_Density.svg&amp;diff=695790"/>
		<updated>2018-03-27T23:44:35Z</updated>

		<summary type="html">&lt;p&gt;Fht14: Fht14 uploaded a new version of File:FHT14P2x6 Temperature vs Density.svg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14P2x6_Temperature_vs_Density.svg&amp;diff=695789</id>
		<title>File:FHT14P2x6 Temperature vs Density.svg</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:FHT14P2x6_Temperature_vs_Density.svg&amp;diff=695789"/>
		<updated>2018-03-27T23:41:42Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695767</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695767"/>
		<updated>2018-03-27T22:40:03Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Results and Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
&lt;br /&gt;
So in generla this is going to be about modelling the thermodynamic and structural (?) properties of a material across multiple phases. It works up from 1) equilibrating the simulation of a melted crystal, to 2) density across different pressure/temperatures, to 3) heat capacity at different density/temperatures, to 4) rdfs (ie. structure) of diff phases, and 5) MSD of diff phases.&lt;br /&gt;
&lt;br /&gt;
1) Discussion of equilibration wrt timestep&lt;br /&gt;
&lt;br /&gt;
2) Ie density increases with temperature. Only asked to do &amp;gt;1.5T, would be nice to see some phase transitions -- fluid-&amp;gt;vapour/liquid, fluid-&amp;gt;liquid, fluid-&amp;gt;solid/liquid, fluid-&amp;gt;solid/liquid-&amp;gt;solid?&lt;br /&gt;
&lt;br /&gt;
3) This tails off. Demonstrate &amp;amp; determine why so weird for D1x3 (maybe weird solid/liquid?)&lt;br /&gt;
&lt;br /&gt;
4) S/L/G -&amp;gt; do for mixed phases too. Also show change in density/temp for a single phase.&lt;br /&gt;
&lt;br /&gt;
5) Same as 4)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Description of general investigation, some key observations to demonstrate that it was successful (it was right?)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conceptual introduction to Molecular Dynamics. Classical approximation-&amp;gt;velocity verlet. Lennard&amp;amp;ndash;Jones overview. Prediction of properties.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Was it effective? &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Bork&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
Unsure if needed. Perhaps just some less useful graphs + some data files?&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are mentioned below, even if already discussed above in the main body&lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695764</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695764"/>
		<updated>2018-03-27T22:36:11Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
&lt;br /&gt;
So in generla this is going to be about modelling the thermodynamic and structural (?) properties of a material across multiple phases. It works up from 1) equilibrating the simulation of a melted crystal, to 2) density across different pressure/temperatures, to 3) heat capacity at different density/temperatures, to 4) rdfs (ie. structure) of diff phases, and 5) MSD of diff phases.&lt;br /&gt;
&lt;br /&gt;
1) Discussion of equilibration wrt timestep&lt;br /&gt;
&lt;br /&gt;
2) Ie density increases with temperature. Only asked to do &amp;gt;1.5T, would be nice to see some phase transitions -- fluid-&amp;gt;vapour/liquid, fluid-&amp;gt;liquid, fluid-&amp;gt;solid/liquid, fluid-&amp;gt;solid/liquid-&amp;gt;solid?&lt;br /&gt;
&lt;br /&gt;
3) This tails off. Demonstrate &amp;amp; determine why so weird for D1x3 (maybe weird solid/liquid?)&lt;br /&gt;
&lt;br /&gt;
4) S/L/G -&amp;gt; do for mixed phases too. Also show change in density/temp for a single phase.&lt;br /&gt;
&lt;br /&gt;
5) Same as 4)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Description of general investigation, some key observations to demonstrate that it was successful (it was right?)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conceptual introduction to Molecular Dynamics. Classical approximation-&amp;gt;velocity verlet. Lennard&amp;amp;ndash;Jones overview. Prediction of properties.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Here a variety of pressures were chosen, for each of which the number density was determined for the range of temperatures &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt; = 1&amp;amp;ndash;3.5. The standard errors in temperature and density were recorded, and are displayed in Fig. @@@. Here it can be seen, as expected, that density decreases with temperature (atoms have more kinetic energy so spend more time further apart). It is also noted that the standard error in temperature increases with temperature, this is likely due to the particles moving faster and as such can move to less realistic positions. Decreasing the size of the time-step would decrease this error. &lt;br /&gt;
&lt;br /&gt;
[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Number density with respect to temperature, dashed lines showing predicted number density &#039;&#039;via&#039;&#039; the ideal gas law]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Was it effective? &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Bork&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
Unsure if needed. Perhaps just some less useful graphs + some data files?&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are mentioned below, even if already discussed above in the main body&lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695756</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695756"/>
		<updated>2018-03-27T21:48:02Z</updated>

		<summary type="html">&lt;p&gt;Fht14: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
&lt;br /&gt;
So in generla this is going to be about modelling the thermodynamic and structural (?) properties of a material across multiple phases. It works up from 1) equilibrating the simulation of a melted crystal, to 2) density across different pressure/temperatures, to 3) heat capacity at different density/temperatures, to 4) rdfs (ie. structure) of diff phases, and 5) MSD of diff phases.&lt;br /&gt;
&lt;br /&gt;
1) Discussion of equilibration wrt timestep&lt;br /&gt;
&lt;br /&gt;
2) Ie density increases with temperature. Only asked to do &amp;gt;1.5T, would be nice to see some phase transitions -- fluid-&amp;gt;vapour/liquid, fluid-&amp;gt;liquid, fluid-&amp;gt;solid/liquid, fluid-&amp;gt;solid/liquid-&amp;gt;solid?&lt;br /&gt;
&lt;br /&gt;
3) This tails off. Demonstrate &amp;amp; determine why so weird for D1x3 (maybe weird solid/liquid?)&lt;br /&gt;
&lt;br /&gt;
4) S/L/G -&amp;gt; do for mixed phases too. Also show change in density/temp for a single phase.&lt;br /&gt;
&lt;br /&gt;
5) Same as 4)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Description of general investigation, some key observations to demonstrate that it was successful (it was right?)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conceptual introduction to Molecular Dynamics. Classical approximation-&amp;gt;velocity verlet. Lennard&amp;amp;ndash;Jones overview. Prediction of properties.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
&lt;br /&gt;
@@@ Why start vals above/below converged value&lt;br /&gt;
&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Was it effective? &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Bork&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
Unsure if needed. Perhaps just some less useful graphs + some data files?&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are mentioned below, even if already discussed above in the main body&lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695686</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695686"/>
		<updated>2018-03-27T19:09:08Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Effect of Time-Step on Equilibration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
&lt;br /&gt;
So in generla this is going to be about modelling the thermodynamic and structural (?) properties of a material across multiple phases. It works up from 1) equilibrating the simulation of a melted crystal, to 2) density across different pressure/temperatures, to 3) heat capacity at different density/temperatures, to 4) rdfs (ie. structure) of diff phases, and 5) MSD of diff phases.&lt;br /&gt;
&lt;br /&gt;
1) Discussion of equilibration wrt timestep&lt;br /&gt;
&lt;br /&gt;
2) Ie density increases with temperature. Only asked to do &amp;gt;1.5T, would be nice to see some phase transitions -- fluid-&amp;gt;vapour/liquid, fluid-&amp;gt;liquid, fluid-&amp;gt;solid/liquid, fluid-&amp;gt;solid/liquid-&amp;gt;solid?&lt;br /&gt;
&lt;br /&gt;
3) This tails off. Demonstrate &amp;amp; determine why so weird for D1x3 (maybe weird solid/liquid?)&lt;br /&gt;
&lt;br /&gt;
4) S/L/G -&amp;gt; do for mixed phases too. Also show change in density/temp for a single phase.&lt;br /&gt;
&lt;br /&gt;
5) Same as 4)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Description of general investigation, some key observations to demonstrate that it was successful (it was right?)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conceptual introduction to Molecular Dynamics. Classical approximation-&amp;gt;velocity verlet. Lennard&amp;amp;ndash;Jones overview. Prediction of properties.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Was it effective? &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Bork&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
Unsure if needed. Perhaps just some less useful graphs + some data files?&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are mentioned below, even if already discussed above in the main body&lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695685</id>
		<title>Rep:LS:FHT14</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:LS:FHT14&amp;diff=695685"/>
		<updated>2018-03-27T19:07:42Z</updated>

		<summary type="html">&lt;p&gt;Fht14: /* Results and Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Prediction of Thermodynamic Properties of the Lennard-Jones Fluid &#039;&#039;via&#039;&#039; Molecular Dynamics Simulations =&lt;br /&gt;
&lt;br /&gt;
So in generla this is going to be about modelling the thermodynamic and structural (?) properties of a material across multiple phases. It works up from 1) equilibrating the simulation of a melted crystal, to 2) density across different pressure/temperatures, to 3) heat capacity at different density/temperatures, to 4) rdfs (ie. structure) of diff phases, and 5) MSD of diff phases.&lt;br /&gt;
&lt;br /&gt;
1) Discussion of equilibration wrt timestep&lt;br /&gt;
&lt;br /&gt;
2) Ie density increases with temperature. Only asked to do &amp;gt;1.5T, would be nice to see some phase transitions -- fluid-&amp;gt;vapour/liquid, fluid-&amp;gt;liquid, fluid-&amp;gt;solid/liquid, fluid-&amp;gt;solid/liquid-&amp;gt;solid?&lt;br /&gt;
&lt;br /&gt;
3) This tails off. Demonstrate &amp;amp; determine why so weird for D1x3 (maybe weird solid/liquid?)&lt;br /&gt;
&lt;br /&gt;
4) S/L/G -&amp;gt; do for mixed phases too. Also show change in density/temp for a single phase.&lt;br /&gt;
&lt;br /&gt;
5) Same as 4)&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Description of general investigation, some key observations to demonstrate that it was successful (it was right?)&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Conceptual introduction to Molecular Dynamics. Classical approximation-&amp;gt;velocity verlet. Lennard&amp;amp;ndash;Jones overview. Prediction of properties.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Aim and Objectives ==&lt;br /&gt;
&lt;br /&gt;
This project seeks to demonstrate trends in various thermodynamic and structural responses to conditions, as well as trends in the results of simulations based on the way these calculations are set up. The areas covered in this investigation are summarised as follows:&lt;br /&gt;
&lt;br /&gt;
* 1 &amp;amp;ndash; How does the value of the time-step effect equilibration of a system&#039;s properties?&lt;br /&gt;
* 2 &amp;amp;ndash; How do simulated densities compare to values predicted by the ideal gas law, and what are the trends seen by varying pressure or temperature?&lt;br /&gt;
* 3 &amp;amp;ndash; What are the trends seen in the volume-specific heat capacity with respect to temperature? How do these trends vary for different densities?&lt;br /&gt;
* 4 &amp;amp;ndash; How does the radial distribution function vary dependent on phase?&lt;br /&gt;
* 5 &amp;amp;ndash; Investigating Mean Squared Displacement and diffusivity for differing phases&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
Throughout this work all simulation calculations were performed on Imperial College London&#039;s High Performance Computing service, using LAMMPS(@@@link). VMD was also used in visualising and analysing the results of said calculations(@@@link+statement). All further analysis was performed utilising the Python programming language(@@@), with project code provided where relevant. All calculations use a Lennard-Jones force-field for uncharged point masses, with a cut-off at 3&amp;amp;sigma;. This potential was used as it is not too computationally intensive, with a cut-off that still captures the majority of significant interactions whilst reducing the number of pairwise interactions to calculate. Unless stated otherwise&lt;br /&gt;
&lt;br /&gt;
The first investigation sought to demonstrate the connection between how a system equilibrates its thermodynamic properties based on the size of the time-step between calculations. The simulations functioned by first populating a simple cubic lattice with 1000 atoms, giving these atoms velocities corresponding to a reduced temperature of 1.5, shifting to the nve microstate, and then measuring the energy, temperature, and pressure over the course of 100 reduced time units. Different values of time-step were tested, 0.015, 0.01, 0.0075, 0.0025, and 0.001. An example input file is provided here(@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
An investigation of density with respect to temperature for the pressures @@@. Temperatures were set from @@@ to @@@. These simulations took place within the NpT ensemble, providing the average pressure, temperature, and density of simulated systems. The process for creating the system is structurally the same as above, although it simulated a larger system of 3375 atoms and used a 0.001 time-step. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Code from the above simulation was adapted to shift to the NVT ensemble, allowing the determination of the volume-specific heat capacity. The simulation functions again by first creating and melting a crystal, bringing it to the desired density and temperature in the NVT ensemble, and then measuring the properties of the system over 100000 steps, with a time-step of 0.001. Resulting averages allow the determination of the volume-specific heat capacity, as seen in Eq. @@@. These simulations were performed for the densities @@@ the temperature range @@@&amp;amp;ndash;@@@. An example input file is provided here (@@@).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq. @@@: &amp;lt;math&amp;gt;C_V = N^2\frac{\langle E^2 \rangle - \langle E \rangle ^2}{k_BT^2}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using similar code to the first investigation (bar the exclusion of the nve microstate, a larger Lennard-Jones cut-off of 3.2&amp;amp;sigma;, a larger time-step of 0.002, and the ability to change temperature) the trajectories of the particles was measured. Using VMD the trajectories were the visualised, and the Radial Pair Distribution Function g(r) extension allowed the determination of the Radial Pair Distribution and its corresponding integral. Using temperatures and densities corresponding to different phases of the Lennard-Jones fluid (taken from @@@), the behaviors in differing phases was analysed. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
Lastly the Mean Squared Displacement for different phases of the Lennard-Jones fluid were analysed. A larger 8000 atom system was used, again using a Lennard-Jones force field with a 3.2&amp;amp;sigma; cut-off distance. The system is melted to the required temperature, equilibrated for 10000 steps, and then the Mean Squared Displacement (@@@ and Velocity Auto Correlation Function) was determined for a subsequent 5000 steps. An example input file is provided here (@@@), provided by Imperial College London.&lt;br /&gt;
&lt;br /&gt;
== Results and Discussion ==&lt;br /&gt;
&lt;br /&gt;
=== Effect of Time-Step on Equilibration ===&lt;br /&gt;
Firstly, brief analysis was performed on the effect of time-step size on the equilibration of a system. To do this five versions of the same system &amp;amp;mdash; 100 reduced time units for a 1000 atom system at a reduced temperature of 1.5 &amp;amp;mdash; were simulated with different time-steps: 0.015, 0.01, 0.0075, 0.0025, 0.001. Every 10 timesteps the total energy was reserved, and is plotted against reduced time below in Fig.@@@.&lt;br /&gt;
&lt;br /&gt;
[[File:Anotherattemptfht14.svg|900 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Total Energy &#039;&#039;vs&#039;&#039; Time, for five different time-steps]]&lt;br /&gt;
&lt;br /&gt;
It is clear that the 0.015 time-step never converges to an equilibrium state, its energy continues to rise and rise &amp;amp;mdash; violating energy conservation. This likely occurs as the time-step is large enough that atoms move far enough per time-step that they end up located unrealistically close to each other, producing a corresponding high repulsive force and raising the system&#039;s energy. In comparison the four shorter time-steps all do converge quickly (within a few steps) to a stable value. Over time these systems do deviate about their converged value, but overall there is no net movement away from it. It is noted that the smaller the time-step, the lower the total energy. Again this will be due to larger time-steps moving closer to each other than is realistic. The smaller deviation about a converged value for smaller time-steps can be understood similarly.&lt;br /&gt;
&lt;br /&gt;
From Fig. @@@ it is clear that the most successful time-steps are the 0.001 and 0.0025. Due to these calculations only taking a relatively short time for either time-step, the smaller value was preserved for later use. Fig. @@@&amp;amp;ndash;@@@ shows further thermodynamic information over the course of the 0.001 time-step simulation. Here it can be seen that the temperature, pressure, and total energy all converge within a short number of time-steps. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ Table @@@ &amp;amp;ndash; Equilibration of thermodynamic properties at the 0.001 time-step&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14introtemperaturevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of temperature]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:Fht14intropressurevtime.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of pressure]]&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[Fht14intrototalenergy.svg|800 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Equilibration of total energy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
Was it effective? &lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
Bork&lt;br /&gt;
&lt;br /&gt;
== Supplementary Materials ==&lt;br /&gt;
&lt;br /&gt;
Unsure if needed. Perhaps just some less useful graphs + some data files?&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
&lt;br /&gt;
For many of the tasks there was little connection between their results and/or content with discussions made in the main body of this report, and I did not want this to prevent my going into depth when tackling them. As such all tasks are mentioned below, even if already discussed above in the main body&lt;br /&gt;
&lt;br /&gt;
=== Velocity&amp;amp;ndash;Verlet work on HO.xls ===&lt;br /&gt;
&lt;br /&gt;
Provided to us was an .xls file containing an implementation of the Velocity&amp;amp;ndash;Verlet algorithm to the Simple Harmonic Oscillator (SHO). We were required to extend this work to calculate the position with respect to time for a classical SHO (&amp;lt;math&amp;gt;A\mathrm{cos}(\omega t+\phi )&amp;lt;/math&amp;gt;), the error in position between the classical and Velocity&amp;amp;ndash;Verlet modellings, and the energy of the Velocity&amp;amp;ndash;Verlet oscillator. This work is available as the provided .xls file (@@@).&lt;br /&gt;
&lt;br /&gt;
Once the above work was completed we were then tasked with investigating the connection between error in position with respect to time. For the time-step 0.1 the error can be seen to oscillate over course of an oscillation &amp;amp;mdash; approximately equal to zero when displacement was maximised. An approximate value of error and time was taken for the five maxima seen in the first 15 time units. This was then fitted to a straight line, as shown in Fig.@@@ alongside the residuals for this fit. This fit shows good agreement with the initial values with no discernible trend in the residuals. However, as this only contains 5 points, it can hardly be called conclusive.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|+ @@@ Errors present in the Velocity&amp;amp;ndash;Verlet model of the SHO&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14fittoerrorsinsho.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Fit to errors in Velocity&amp;amp;ndash;Verlet model for SHO]]&lt;br /&gt;
|&lt;br /&gt;
[[File:FHT14residualsinshoerror.svg|500 px|thumb|centre|Fig. @@@ &amp;amp;ndash; Residuals of fit to said model]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If we increase the simulation time to be much larger than 14.2 (Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time up to t=100) we can see that this linear relationship continues. If we then begin to increase the size of the time-step, more complex features of this plot begin to emerge as the errors become more significant. Fig.@@@ shows the error in position &#039;&#039;vs&#039;&#039; time for a time-step of 0.55. Here it can be seen that there is a periodic trend in the error. This can be explained by the fact that the Velocity&amp;amp;ndash;Verlet oscillator lags behind the classically modeled oscillator, and that eventually it lags so far behind that it is half an oscillation behind the classical oscillator. Once it reaches this point its lagging behind actually serves to decrease the error in position, until it eventually catches up again &amp;amp;mdash; an error of 0. At even higher time-steps, even more complex features can be seen &amp;amp;dash; likely due to the differing errors in estimating position and velocity in the Velocity&amp;amp;ndash;Verlet algorithm.&lt;br /&gt;
&lt;br /&gt;
We were also tasked with analysing the deviation in total energy of the Velocity&amp;amp;ndash;Verlet-modeled oscillator. For a SHO, the total energy is equal to the kinetic energy plus the potential energy (Eq. @@@), and is constant over time. As in the Velocity&amp;amp;ndash;Verlet oscillator there is an error in both velocity and position, we expect the total energy to deviate over time. Fig.@@@ shows the total energy &#039;&#039;vs&#039;&#039; time for the Velocity&amp;amp;ndash;Verlet with time-step equal to 0.1, which changes in energy by up to 0.25% over the course of the simulation. By varying the time-step it was found that a value of approximately 0.2 would give a maximum change in energy of 1%.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;Eq.@@@ &amp;lt;math&amp;gt;\mathrm{Total\ Energy} = \frac{1}{2} \left( kx^2 + mv^2 \right)&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important to monitor the total energy over the course of a simulation as it is a value which we expect to be conserved. As such any observed deviation from the initial value is demonstrative of the fact that the simulation is falling short in some fashion. Equally one can then use this to optimise simulation accuracy &#039;&#039;vs&#039;&#039; computational time &amp;amp;mdash; a shorter time-step means that it will take more calculations to simulate the same period of time, but will ensure that the accuracy is better.&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces ===&lt;br /&gt;
&lt;br /&gt;
We were tasked with performing the following calculations on the Lennard-Jones potential: &amp;lt;math&amp;gt; \phi (r) = 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;
1 &amp;amp;ndash; What is the separation &amp;lt;math&amp;gt;r_0&amp;lt;/math&amp;gt; where the potential energy is zero?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_0\ \mathrm{where\ } \phi (r) = 4\epsilon \left( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} \right) = 0&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt; \Rightarrow \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6} = 0 \Rightarrow \frac{\sigma^{12}}{r_0^{12}} = \frac{\sigma^6}{r_0^6} \Rightarrow \frac{\sigma^{12}}{\sigma^{6}} = \frac{r_0^{12}}{r_0^6} \Rightarrow \sigma^6 = r_0^6 \rightarrow r_0 = \sigma&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the force at this separation?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{-\mathrm{d}\phi (r_0)}{\mathrm{d}r} = -4\epsilon \left( \frac{-12\sigma^{12}}{r_0^{13}} + \frac{6\sigma^6}{r_0^7} \right) = -4\epsilon \left( \frac{-6}{\epsilon} \right) = \frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; What is the equilibrium separation &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \mathrm{Minimum\ potential\ where}\ \frac{\mathrm{d}\phi (r_{eq})}{\mathrm{d}r} = 0 = 4\epsilon \left( \frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7} \right) \Rightarrow \frac{6\sigma^6}{r_{eq}^7} = \frac{12\sigma^{12}}{r_{eq}^{13}} \Rightarrow \frac{2\sigma^{12}}{\sigma^6} = \frac{r_{eq}^{13}}{r_{eq}^{7}} \Rightarrow r_{eq}^6 = 2\sigma^6 \Rightarrow r_{eq} = 2^{\frac{1}{6}}\sigma &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4 &amp;amp;ndash; What is the well depth at &amp;lt;math&amp;gt;r_{eq}&amp;lt;/math&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \phi (r_{eq}) = 4\epsilon \left( \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6} \right) = 4\epsilon \left( \frac{\sigma^{12}}{2^2\sigma^{12}} - \frac{\sigma^6}{2\sigma^6} \right) = 4\epsilon \left( \frac{1}{4} - \frac{1}{2} \right) = -\epsilon &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5 &amp;amp;ndash; Evaluate &amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt; x = 2\sigma , 2.5\sigma , 3\sigma &amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt; \sigma = \epsilon = 1&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int \limits_x^\infty \phi (r)\mathrm{d}r = \left[ 4\epsilon \left( \frac{\sigma^6}{5r^5} - \frac{\sigma^{11}}{11r^{11}} \right) \right]^\infty_x = \left[ 4\left( \frac{1}{5r^5} - \frac{1}{11r^{11}} \right) \right]^\infty_x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For x equal to 2, 2.5, and 3&amp;amp;sigma;, this integral is equal to -0.024822, -0.0081767, and -0.0032901 respectively. Compared to the entire integral for 1 to infinity these values are equivalent to 5.69, 1.87, and 0.75% respectively. These values demonstrate that not including pair interactions further away than 3&amp;amp;sigma; still ensures that the overwhelming majority of significant interactions would still be included.&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
&lt;br /&gt;
1 mL of water weighs approximately 1 g. The number of moles present in 1 g of water is 1/18.01528. The number of water molecules present in 1/18.01528 moles is N&amp;lt;sub&amp;gt;A&amp;lt;/sub&amp;gt;/18.01528 = 3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt; molecules. Therefore 10000 molecules of water only fills a volume of 10000/(3.3427961x10&amp;lt;sup&amp;gt;22&amp;lt;/sup&amp;gt;) mL, approximately 3x10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL.&lt;br /&gt;
&lt;br /&gt;
Consider an atom at the centre of a simulation box from (0,0,0) to (1,1,1), which moves along the vector (0.7,0.6,0.2) in a single time-step. We can determine this simply by traveling along each axis individually. First, we travel from x=0.5 to x=1.2, which is x=0.2 after moving through the periodic boundary. Along the y-axis we travel from y=0.5 to y=1.1, which is y=0.1 after moving through the periodic boundary. Lastly along the z-axis we travel from z=0.5 to z=0.7. Overall this amounts to traveling from (0.5,0.5,0.5) to (0.2,0.1,0.7).&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
&lt;br /&gt;
Commonly in simulation work we shift to a different set of units so as to make data handling more facile. Here LAMMPS works in the Lennard-Jones reduced units. We have been asked to convert the following from reduced units for the case of Argon:&lt;br /&gt;
&lt;br /&gt;
1 &amp;amp;ndash; The distance &amp;lt;math&amp;gt;r^* = 3.2&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The reduced distance &amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;r = r^*\sigma&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;r = 0.34 * 3.2 = 1.088 \mathrm{nm}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2 &amp;amp;ndash; What is the well depth in kJ mol&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
The well depth was previously shown to be 1&amp;amp;epsilon;, which is defined by &amp;lt;math&amp;gt;\frac{\epsilon}{k_B}=120\mathrm{K} \Rightarrow \epsilon = 120k_B\  \mathrm{Joules} = \frac{120k_B*N_A}{1000}\ \mathrm{kJ mol}^{-1} = 0.998\ \mathrm{kJ mol}^{-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3 &amp;amp;ndash; 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;
The reduced temperature is defined by &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon} \Rightarrow T = \frac{\epsilon T^*}{k_B} = T^*120 \mathrm{K} = 180 \mathrm{K}&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
&lt;br /&gt;
When creating the system to simulate we must first populate our space with particles. In the work in the above report LAMMPS does this by placing the particles onto an ordered crystal lattice. One&#039;s first thought may be to instead just randomly distribute the particles, but this can lead to particles being initially placed far too close together. If two particles were placed less that 1&amp;amp;sigma; apart, then there would be a corresponding incredibly high repulsive force. In a system with these unrealistic cases the energy density will be far higher than in a real system. As such it is just easier to initially start with ordered positions, and introduce disorder in a different fashion &amp;amp;mdash; in the simulations in this work, this was achieved by giving random velocities that still fit a Maxwell&amp;amp;ndash;Boltzmann distribution.&lt;br /&gt;
&lt;br /&gt;
In some of our first calculations we generated a simple cubic system with a number density of 0.8. As such the shortest distance between particles (and the side-length of a unit cell) was 1.07722 (reduced units). We are asked to determine the side-length of a face-centered cubic lattice cell which would give rise to a number density of 1.2. We remember that the face-centered cubic cell contains 4 lattice points, compared to the simple cubic&#039;s 1. As such the face-centered cell which gives a number density of 1.2 has the same volume as the simple cubic cell which give a number density of 0.3 (1.2/4). Number density is equal to the number of lattice points per unit cell divided by the volume of the unit cell: &amp;lt;math&amp;gt; \rho = N/V \Rightarrow 1.2 = 4/(\mathrm{side\ length})^3&amp;lt;/math&amp;gt;, rearranging this we find that the 1.2 number density face-centered cubic unit cell has a side-length of 1.49380 (reduced units).&lt;br /&gt;
&lt;br /&gt;
Example code provided to us generates a 1000 unit cell box of a simple cubic lattice. It therefore contains 1000 lattice points, as the simple cubic lattice contains only a single lattice point. If we had instead generated a face-centered cubic lattice, it would contain four times as many lattice points mdash; 4000 points, and therefore 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of Atoms ===&lt;br /&gt;
&lt;br /&gt;
We were asked with explaining the following code using the LAMMPS manual:&lt;br /&gt;
&lt;br /&gt;
::: &amp;lt;tt&amp;gt; mass 1 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_style lj/cut 3.0 &amp;lt;/tt&amp;gt;       &lt;br /&gt;
::: &amp;lt;tt&amp;gt; pair_coeff * * 1.0 1.0 &amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1 set the mass of atom type 1 to the value of 1.0. We only simulate a single type of atom in our calculations, so atom type 1 refers to all of the atoms seen in our system. We note that the mass is in reduced units, and so for the argon system corresponds to 6.69x10&amp;lt;sup&amp;gt;-26&amp;lt;/sup&amp;gt; kg. Line 2 refers to the model or set of formulae used to calculate pairwise interactions between atoms. Here, the parameter &amp;lt;tt&amp;gt;lj/cut&amp;lt;/tt&amp;gt; means that we are using the Lennard-Jones potential, with no Coulombic calculation, and cuts-off after a certain distance. The second parameter &amp;lt;tt&amp;gt;3.0&amp;lt;/tt&amp;gt; tells LAMMPS what that cut-off threshold is &amp;amp;mdash; 3&amp;amp;sigma;. As previous tasks demonstrated, this still preserves the overwhelming majority of interactions. Line 3 sets the force field coefficients for pairwise interactions. The first two &amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt; mean that it is referring to the pairwise interactions of any pair of atom types (as we only have the single atom type, 1, this could have equally been &amp;lt;tt&amp;gt;1 1&amp;lt;/tt&amp;gt;) The third and fourth parameters, &amp;lt;tt&amp;gt;1.0 1.0&amp;lt;/tt&amp;gt;, set the force field coefficients to 1. For the molecular dynamics of more complex particles, e.g. organic molecules, a more complex force field is required to account for molecular geometries and degrees of freedom. In the case of our simulations, our particles are modeled as uniform points, and therefore have no need for a more complex force field model.&lt;br /&gt;
&lt;br /&gt;
We note that the provided code requires the setting of both initial position and velocity. This demonstrates that LAMMPS utilises the Velocity&amp;amp;ndash;Verlet algorithm to perform its dynamics.&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
&lt;br /&gt;
We are asked to discuss the usage of a variable timestep in the following code, and why not just get rid of the first two lines and hard-code the values into the last two lines:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable timestep equal 0.001&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;variable n_steps equal floor(100/${timestep})&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;timestep ${timestep}&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;...&amp;lt;/tt&amp;gt;&lt;br /&gt;
:::&amp;lt;tt&amp;gt;run ${n_steps}&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Firstly the usage of variables provides a single location where a value can be changed, a change which will automatically propagate to all other points where the variable is used. One may wish to study the effect of changing &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; on the simulation, and therefore being able to change its value quickly is important &amp;amp;mdash; changing it manually would be much more involved. We can also use the variable &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt; to automatically work out the number of steps needed to simulate a certain amount of time. The second line of code above calculates the number of steps needed to simulate 100 time units for any general value of timestep. Again, here it would require a more involved process (likely easily fraught with human error) to require the user to work out and change the value of &amp;lt;tt&amp;gt;n_steps&amp;lt;/tt&amp;gt; each time they wished to change the value of &amp;lt;tt&amp;gt;timestep&amp;lt;/tt&amp;gt;. Both of these variables are of note to the person running the simulation, and therefore having them easily available as parameters is of benefit.&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Temperature and Pressure Control ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
&lt;br /&gt;
In order to manage the total energy of our system (the importance of which has been previously discussed) we must look at the kinetic energy of our system. From the equipartion theorem we know that the total kinetic energy is related to the temperature of our system by the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;E_\mathrm{kinetic} = \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the temperature fluctuates (partly due to errors in the prediction of velocities under the Velocity&amp;amp;ndash;Verlet algorithm) we need to tweak the velocities to keep the instantaneous temperature (&amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;) the same as the desired temperature (&amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;). We do this by modifying the velocities by some uniform scaling factor &amp;amp;gamma;. The below calculations derive the value of &amp;amp;gamma;.&lt;br /&gt;
&lt;br /&gt;
At some time &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; we have a system of particles with velocities &amp;lt;math&amp;gt;\omega_i&amp;lt;/math&amp;gt; and temperature &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. We wish the system to instead have the temperature &amp;lt;math&amp;gt;\mathfrak{T}&amp;lt;/math&amp;gt;, which would be the case if the particles instead had velocities &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Have:}\ \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_BT&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\mathrm{Want:}\ \frac{1}{2} \sum_i^Nm_iv_i^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We define a scaling variable &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2} \sum_i^Nm_i(\gamma\omega_i)^2=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 \frac{1}{2} \sum_i^Nm_i\omega_i^2=\frac{3}{2}Nk_B\mathfrak{T} \Rightarrow \gamma^2 \left[  \frac{1}{2} \sum_i^Nm_i\omega_i^2\right]=\gamma^2\left[ \frac{3}{2}Nk_BT\right]=\frac{3}{2}Nk_B\mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rearranging to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T} \Rightarrow \gamma = \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
&lt;br /&gt;
We are asked to analyse and explain the following line of code from npt.in:&lt;br /&gt;
&lt;br /&gt;
:::&amp;lt;tt&amp;gt;fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generates an average of the six stated variables using a specified set of data. The three numbers in the code, &amp;lt;tt&amp;gt;100, 1000, 100000&amp;lt;/tt&amp;gt;, define this set of data to be used to form a time-based average. The final number states the final data-point to be used in the average. The second number states how many data points will be used to generate the average. The first number states the distance between used data points. Therefore the above code dictates that every 100&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; data point up to point 100000 (a total of 1000 points) will be used to find the average.&lt;br /&gt;
&lt;br /&gt;
We also note the line &amp;lt;tt&amp;gt;run 100000&amp;lt;/tt&amp;gt; which means that the system will simulate 100000 steps. From the above definition therefore only a single average will be outputted for each variable, as the system will only simulate enough steps to complete a single average. For a time-step of 0.001 this will simulate 100 reduced time units (approximately 2x10&amp;lt;sup&amp;gt;-10&amp;lt;/sup&amp;gt; seconds for the argon system).&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equation of State ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Heat Capacity Calculation ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== The Radial Distribution Function ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;br /&gt;
&lt;br /&gt;
=== Mean Squared Displacement ===&lt;br /&gt;
&lt;br /&gt;
Discuss in main body&lt;/div&gt;</summary>
		<author><name>Fht14</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fht14intrototalenergy.svg&amp;diff=695684</id>
		<title>File:Fht14intrototalenergy.svg</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Fht14intrototalenergy.svg&amp;diff=695684"/>
		<updated>2018-03-27T19:06:50Z</updated>

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