<?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=Mk2815</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=Mk2815"/>
	<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/wiki/Special:Contributions/Mk2815"/>
	<updated>2026-05-16T07:54:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674429</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674429"/>
		<updated>2018-02-28T08:53:44Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Academic Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
Newtonian-esque simulations with Lennard-Jones pairwise potentials are used to simulate fluids and solids under different physical parameters, and the effects of varying these parameters are measured. The data is rationalised but more work is required to understand the effects of larger sample sizes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical, and were used for 10000 timesteps. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume with temperature for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calculating the radial distribution function for a 15 × 15 × 15 lattice in different phases, the number density and temperature for the solid, liquid and vapour phases were obtained from &#039;Phase Transitions of the Lennard-Jones System&#039;, Jean-Pierre Hansen and Loup Verlet, &#039;&#039;Phys. Rev.&#039;&#039; 184, 151 – Published 5 August 1969. In these calculations, the gas density was 0.073 and temperature 1.5, the liquid density 0.606 and temperature 1.15, and the solid density 0.973 and temperature 0.75. The solid was assigned a face-centred cubic lattice structure. The trajectory files were then used in VMD to calculate the radial distribution function &amp;lt;math display=inline&amp;gt;g(r)&amp;lt;/math&amp;gt; and its integral, which were plotted for different phases against &amp;lt;math display=inline&amp;gt;r&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
When calculating the diffusion coefficient for a 20 × 20 × 20 lattice in different phases, the same density and temperature values from the previous calculations were used to calculate the total particular mean squared displacement, the derivative of which is equivalent to twice the product of the spatial dimensionality and the diffusion coefficient. In this case, the dimensionality is, naturally, three. The mean-square displacement was graphed as a function of time, and the pseudo-linear plots used to calculate a value for the diffusion coefficient. These plots were then compared with identical plots for one million atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and pressures (in blue colours on the graph) predicted that lower temperatures and lower pressures would produce a lower-density liquid, a logically consistent result. These results were also compared with predictions using the ideal gas law (in red colours), which produced densities much higher than expected: this is because the ideal gas law treats particles as classical Newtonian objects that repel simply through direct contact. The Lennard-Jones model is a more sophisticated way of treating particles that takes electronic repulsions beyond a critical radius into account. The discrepancy between the simulated and calculated data, however, decreased with increasing temperature, as the large thermal energy of the atoms was able to overcome some of the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and densities predicted that the heat capacity of the liquid fell with temperature, and that it was higher with pressure. The latter result is logically consistent, as higher pressure (red on the graph) increases the internal energy of the fluid which means that more energetic states are available to populate, increasing the ability of the substance to absorb energy without heating up. Furthermore the energy states become closer together. However, the former result is very odd, as higher temperature, like higher pressure, should make higher-energy states more accessible and thus increase the specific heat of the fluid. However, this is not the case, and this could be attributed to the lack of vibrational, rotational (and possibly electronic) degrees of freedom for this particular system due to the atomic identities.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of radial distribution functions and their integrals predicted a smooth tendency of the RDF towards unity for a gas, a slightly less smooth tendency for a liquid, and an outright fluctuation of the solid around an average value of unity. This makes sense in all cases: a crystalline solid should not see an equal probability of finding a particle anywhere because it has an ordered structure which means that, in certain points, there will almost never be an atom. However, a gas is much more entropic, so the probability of finding a particle anywhere evens out more rapidly. The coordination number of the solid can easily be found from the value of the integral of the RDF at the first minimum point of the graph. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| 80,000 Atoms || 1,000,000 Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of mean squared displacement against time predicted a smooth, almost-linear increase in MSD (and, thus, the diffusion coefficient) with time, and a higher MSD for gases than liquids and liquids than solids. This absolutely corresponds with scientific reasoning: particles in more disordered states at higher temperatures will experience larger displacements from their original positions. The solid phase especially experiences very little diffusion due to the compact, tightly-bound nature of the particles. However, when comparing the simulations for 80,000 and 1,000,000 atoms, the values diverge. The values for a gas are similar but the values for a solid are significantly lower for more atoms. Looking at the graph reveals some sources: the diffusion coefficient was calculated from the mean of the gradient of the linear portion of the plot, but there are some negative derivative values on the solid line for 1m particles that could skew the data. Furthermore, there could have been a change in density, pressure or temperature parameters when the sample size was increased, all of which would greatly influence the value of the mean-squared displacement.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
This experiment was successful in simulating small numbers of atoms in varying phases under different thermodynamic parameters to extract physical data. It is now important to investigate the effect of greater sample size (number of atoms considered) on the accuracy of the data as there were significant deviations between the million and eighty-thousand atom calculations. Specific molecular interactions, such as hydrogen bonding, should also be taken into account, in order to better simulate real-life systems.&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674428</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674428"/>
		<updated>2018-02-28T08:52:56Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Abstract */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
Newtonian-esque simulations with Lennard-Jones pairwise potentials are used to simulate fluids and solids under different physical parameters, and the effects of varying these parameters are measured. The data is rationalised but more work is required to understand the effects of larger sample sizes.&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical, and were used for 10000 timesteps. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume with temperature for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calculating the radial distribution function for a 15 × 15 × 15 lattice in different phases, the number density and temperature for the solid, liquid and vapour phases were obtained from &#039;Phase Transitions of the Lennard-Jones System&#039;, Jean-Pierre Hansen and Loup Verlet, &#039;&#039;Phys. Rev.&#039;&#039; 184, 151 – Published 5 August 1969. In these calculations, the gas density was 0.073 and temperature 1.5, the liquid density 0.606 and temperature 1.15, and the solid density 0.973 and temperature 0.75. The solid was assigned a face-centred cubic lattice structure. The trajectory files were then used in VMD to calculate the radial distribution function &amp;lt;math display=inline&amp;gt;g(r)&amp;lt;/math&amp;gt; and its integral, which were plotted for different phases against &amp;lt;math display=inline&amp;gt;r&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
When calculating the diffusion coefficient for a 20 × 20 × 20 lattice in different phases, the same density and temperature values from the previous calculations were used to calculate the total particular mean squared displacement, the derivative of which is equivalent to twice the product of the spatial dimensionality and the diffusion coefficient. In this case, the dimensionality is, naturally, three. The mean-square displacement was graphed as a function of time, and the pseudo-linear plots used to calculate a value for the diffusion coefficient. These plots were then compared with identical plots for one million atoms.&lt;br /&gt;
&lt;br /&gt;
(556 Words).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and pressures (in blue colours on the graph) predicted that lower temperatures and lower pressures would produce a lower-density liquid, a logically consistent result. These results were also compared with predictions using the ideal gas law (in red colours), which produced densities much higher than expected: this is because the ideal gas law treats particles as classical Newtonian objects that repel simply through direct contact. The Lennard-Jones model is a more sophisticated way of treating particles that takes electronic repulsions beyond a critical radius into account. The discrepancy between the simulated and calculated data, however, decreased with increasing temperature, as the large thermal energy of the atoms was able to overcome some of the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and densities predicted that the heat capacity of the liquid fell with temperature, and that it was higher with pressure. The latter result is logically consistent, as higher pressure (red on the graph) increases the internal energy of the fluid which means that more energetic states are available to populate, increasing the ability of the substance to absorb energy without heating up. Furthermore the energy states become closer together. However, the former result is very odd, as higher temperature, like higher pressure, should make higher-energy states more accessible and thus increase the specific heat of the fluid. However, this is not the case, and this could be attributed to the lack of vibrational, rotational (and possibly electronic) degrees of freedom for this particular system due to the atomic identities.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of radial distribution functions and their integrals predicted a smooth tendency of the RDF towards unity for a gas, a slightly less smooth tendency for a liquid, and an outright fluctuation of the solid around an average value of unity. This makes sense in all cases: a crystalline solid should not see an equal probability of finding a particle anywhere because it has an ordered structure which means that, in certain points, there will almost never be an atom. However, a gas is much more entropic, so the probability of finding a particle anywhere evens out more rapidly. The coordination number of the solid can easily be found from the value of the integral of the RDF at the first minimum point of the graph. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| 80,000 Atoms || 1,000,000 Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of mean squared displacement against time predicted a smooth, almost-linear increase in MSD (and, thus, the diffusion coefficient) with time, and a higher MSD for gases than liquids and liquids than solids. This absolutely corresponds with scientific reasoning: particles in more disordered states at higher temperatures will experience larger displacements from their original positions. The solid phase especially experiences very little diffusion due to the compact, tightly-bound nature of the particles. However, when comparing the simulations for 80,000 and 1,000,000 atoms, the values diverge. The values for a gas are similar but the values for a solid are significantly lower for more atoms. Looking at the graph reveals some sources: the diffusion coefficient was calculated from the mean of the gradient of the linear portion of the plot, but there are some negative derivative values on the solid line for 1m particles that could skew the data. Furthermore, there could have been a change in density, pressure or temperature parameters when the sample size was increased, all of which would greatly influence the value of the mean-squared displacement.&lt;br /&gt;
&lt;br /&gt;
(574 Words.)&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
This experiment was successful in simulating small numbers of atoms in varying phases under different thermodynamic parameters to extract physical data. It is now important to investigate the effect of greater sample size (number of atoms considered) on the accuracy of the data as there were significant deviations between the million and eighty-thousand atom calculations. Specific molecular interactions, such as hydrogen bonding, should also be taken into account, in order to better simulate real-life systems.&lt;br /&gt;
&lt;br /&gt;
(75 Words.)&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674412</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674412"/>
		<updated>2018-02-28T08:11:13Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical, and were used for 10000 timesteps. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume with temperature for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calculating the radial distribution function for a 15 × 15 × 15 lattice in different phases, the number density and temperature for the solid, liquid and vapour phases were obtained from &#039;Phase Transitions of the Lennard-Jones System&#039;, Jean-Pierre Hansen and Loup Verlet, &#039;&#039;Phys. Rev.&#039;&#039; 184, 151 – Published 5 August 1969. In these calculations, the gas density was 0.073 and temperature 1.5, the liquid density 0.606 and temperature 1.15, and the solid density 0.973 and temperature 0.75. The solid was assigned a face-centred cubic lattice structure. The trajectory files were then used in VMD to calculate the radial distribution function &amp;lt;math display=inline&amp;gt;g(r)&amp;lt;/math&amp;gt; and its integral, which were plotted for different phases against &amp;lt;math display=inline&amp;gt;r&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
When calculating the diffusion coefficient for a 20 × 20 × 20 lattice in different phases, the same density and temperature values from the previous calculations were used to calculate the total particular mean squared displacement, the derivative of which is equivalent to twice the product of the spatial dimensionality and the diffusion coefficient. In this case, the dimensionality is, naturally, three. The mean-square displacement was graphed as a function of time, and the pseudo-linear plots used to calculate a value for the diffusion coefficient. These plots were then compared with identical plots for one million atoms.&lt;br /&gt;
&lt;br /&gt;
(556 Words).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and pressures (in blue colours on the graph) predicted that lower temperatures and lower pressures would produce a lower-density liquid, a logically consistent result. These results were also compared with predictions using the ideal gas law (in red colours), which produced densities much higher than expected: this is because the ideal gas law treats particles as classical Newtonian objects that repel simply through direct contact. The Lennard-Jones model is a more sophisticated way of treating particles that takes electronic repulsions beyond a critical radius into account. The discrepancy between the simulated and calculated data, however, decreased with increasing temperature, as the large thermal energy of the atoms was able to overcome some of the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and densities predicted that the heat capacity of the liquid fell with temperature, and that it was higher with pressure. The latter result is logically consistent, as higher pressure (red on the graph) increases the internal energy of the fluid which means that more energetic states are available to populate, increasing the ability of the substance to absorb energy without heating up. Furthermore the energy states become closer together. However, the former result is very odd, as higher temperature, like higher pressure, should make higher-energy states more accessible and thus increase the specific heat of the fluid. However, this is not the case, and this could be attributed to the lack of vibrational, rotational (and possibly electronic) degrees of freedom for this particular system due to the atomic identities.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of radial distribution functions and their integrals predicted a smooth tendency of the RDF towards unity for a gas, a slightly less smooth tendency for a liquid, and an outright fluctuation of the solid around an average value of unity. This makes sense in all cases: a crystalline solid should not see an equal probability of finding a particle anywhere because it has an ordered structure which means that, in certain points, there will almost never be an atom. However, a gas is much more entropic, so the probability of finding a particle anywhere evens out more rapidly. The coordination number of the solid can easily be found from the value of the integral of the RDF at the first minimum point of the graph. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| 80,000 Atoms || 1,000,000 Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of mean squared displacement against time predicted a smooth, almost-linear increase in MSD (and, thus, the diffusion coefficient) with time, and a higher MSD for gases than liquids and liquids than solids. This absolutely corresponds with scientific reasoning: particles in more disordered states at higher temperatures will experience larger displacements from their original positions. The solid phase especially experiences very little diffusion due to the compact, tightly-bound nature of the particles. However, when comparing the simulations for 80,000 and 1,000,000 atoms, the values diverge. The values for a gas are similar but the values for a solid are significantly lower for more atoms. Looking at the graph reveals some sources: the diffusion coefficient was calculated from the mean of the gradient of the linear portion of the plot, but there are some negative derivative values on the solid line for 1m particles that could skew the data. Furthermore, there could have been a change in density, pressure or temperature parameters when the sample size was increased, all of which would greatly influence the value of the mean-squared displacement.&lt;br /&gt;
&lt;br /&gt;
(574 Words.)&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
This experiment was successful in simulating small numbers of atoms in varying phases under different thermodynamic parameters to extract physical data. It is now important to investigate the effect of greater sample size (number of atoms considered) on the accuracy of the data as there were significant deviations between the million and eighty-thousand atom calculations. Specific molecular interactions, such as hydrogen bonding, should also be taken into account, in order to better simulate real-life systems.&lt;br /&gt;
&lt;br /&gt;
(75 Words.)&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674411</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674411"/>
		<updated>2018-02-28T08:10:18Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical, and were used for 10000 timesteps. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume with temperature for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calculating the radial distribution function for a 15 × 15 × 15 lattice in different phases, the number density and temperature for the solid, liquid and vapour phases were obtained from &#039;Phase Transitions of the Lennard-Jones System&#039;, Jean-Pierre Hansen and Loup Verlet, &#039;&#039;Phys. Rev.&#039;&#039; 184, 151 – Published 5 August 1969. In these calculations, the gas density was 0.073 and temperature 1.5, the liquid density 0.606 and temperature 1.15, and the solid density 0.973 and temperature 0.75. The solid was assigned a face-centred cubic lattice structure. The trajectory files were then used in VMD to calculate the radial distribution function &amp;lt;math display=inline&amp;gt;g(r)&amp;lt;/math&amp;gt; and its integral, which were plotted for different phases against &amp;lt;math display=inline&amp;gt;r&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
When calculating the diffusion coefficient for a 20 × 20 × 20 lattice in different phases, the same density and temperature values from the previous calculations were used to calculate the total particular mean squared displacement, the derivative of which is equivalent to twice the product of the spatial dimensionality and the diffusion coefficient. In this case, the dimensionality is, naturally, three. The mean-square displacement was graphed as a function of time, and the pseudo-linear plots used to calculate a value for the diffusion coefficient. These plots were then compared with identical plots for one million atoms.&lt;br /&gt;
&lt;br /&gt;
(556 Words).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and pressures (in blue colours on the graph) predicted that lower temperatures and lower pressures would produce a lower-density liquid, a logically consistent result. These results were also compared with predictions using the ideal gas law (in red colours), which produced densities much higher than expected: this is because the ideal gas law treats particles as classical Newtonian objects that repel simply through direct contact. The Lennard-Jones model is a more sophisticated way of treating particles that takes electronic repulsions beyond a critical radius into account. The discrepancy between the simulated and calculated data, however, decreased with increasing temperature, as the large thermal energy of the atoms was able to overcome some of the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and densities predicted that the heat capacity of the liquid fell with temperature, and that it was higher with pressure. The latter result is logically consistent, as higher pressure (red on the graph) increases the internal energy of the fluid which means that more energetic states are available to populate, increasing the ability of the substance to absorb energy without heating up. Furthermore the energy states become closer together. However, the former result is very odd, as higher temperature, like higher pressure, should make higher-energy states more accessible and thus increase the specific heat of the fluid. However, this is not the case, and this could be attributed to the lack of vibrational, rotational (and possibly electronic) degrees of freedom for this particular system due to the atomic identities.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of radial distribution functions and their integrals predicted a smooth tendency of the RDF towards unity for a gas, a slightly less smooth tendency for a liquid, and an outright fluctuation of the solid around an average value of unity. This makes sense in all cases: a crystalline solid should not see an equal probability of finding a particle anywhere because it has an ordered structure which means that, in certain points, there will almost never be an atom. However, a gas is much more entropic, so the probability of finding a particle anywhere evens out more rapidly. The coordination number of the solid can easily be found from the value of the integral of the RDF at the first minimum point of the graph. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| 80,000 Atoms || 1,000,000 Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of mean squared displacement against time predicted a smooth, almost-linear increase in MSD (and, thus, the diffusion coefficient) with time, and a higher MSD for gases than liquids and liquids than solids. This absolutely corresponds with scientific reasoning: particles in more disordered states at higher temperatures will experience larger displacements from their original positions. The solid phase especially experiences very little diffusion due to the compact, tightly-bound nature of the particles. However, when comparing the simulations for 80,000 and 1,000,000 atoms, the values diverge. The values for a gas are similar but the values for a solid are significantly lower for more atoms. Looking at the graph reveals some sources: the diffusion coefficient was calculated from the mean of the gradient of the linear portion of the plot, but there are some negative derivative values on the solid line for 1m particles that could skew the data. Furthermore, there could have been a change in density, pressure or temperature parameters when the sample size was increased, all of which would greatly influence the value of the mean-squared displacement.&lt;br /&gt;
&lt;br /&gt;
(574 Words.)&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
This experiment was successful in simulating small numbers of atoms in varying phases under different thermodynamic parameters to extract physical data. It is now important to investigate the effect of greater sample size (number of atoms considered) on the accuracy of the data as there were significant deviations between the million and eighty-thousand atom calculations. Specific molecular interactions, such as hydrogen bonding, should also be taken into account, in order to better simulate real-life systems.&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674410</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674410"/>
		<updated>2018-02-28T08:06:47Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Results and Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical, and were used for 10000 timesteps. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume with temperature for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calculating the radial distribution function for a 15 × 15 × 15 lattice in different phases, the number density and temperature for the solid, liquid and vapour phases were obtained from &#039;Phase Transitions of the Lennard-Jones System&#039;, Jean-Pierre Hansen and Loup Verlet, &#039;&#039;Phys. Rev.&#039;&#039; 184, 151 – Published 5 August 1969. In these calculations, the gas density was 0.073 and temperature 1.5, the liquid density 0.606 and temperature 1.15, and the solid density 0.973 and temperature 0.75. The solid was assigned a face-centred cubic lattice structure. The trajectory files were then used in VMD to calculate the radial distribution function &amp;lt;math display=inline&amp;gt;g(r)&amp;lt;/math&amp;gt; and its integral, which were plotted for different phases against &amp;lt;math display=inline&amp;gt;r&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
When calculating the diffusion coefficient for a 20 × 20 × 20 lattice in different phases, the same density and temperature values from the previous calculations were used to calculate the total particular mean squared displacement, the derivative of which is equivalent to twice the product of the spatial dimensionality and the diffusion coefficient. In this case, the dimensionality is, naturally, three. The mean-square displacement was graphed as a function of time, and the pseudo-linear plots used to calculate a value for the diffusion coefficient. These plots were then compared with identical plots for one million atoms.&lt;br /&gt;
&lt;br /&gt;
(556 Words).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and pressures (in blue colours on the graph) predicted that lower temperatures and lower pressures would produce a lower-density liquid, a logically consistent result. These results were also compared with predictions using the ideal gas law (in red colours), which produced densities much higher than expected: this is because the ideal gas law treats particles as classical Newtonian objects that repel simply through direct contact. The Lennard-Jones model is a more sophisticated way of treating particles that takes electronic repulsions beyond a critical radius into account. The discrepancy between the simulated and calculated data, however, decreased with increasing temperature, as the large thermal energy of the atoms was able to overcome some of the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and densities predicted that the heat capacity of the liquid fell with temperature, and that it was higher with pressure. The latter result is logically consistent, as higher pressure (red on the graph) increases the internal energy of the fluid which means that more energetic states are available to populate, increasing the ability of the substance to absorb energy without heating up. Furthermore the energy states become closer together. However, the former result is very odd, as higher temperature, like higher pressure, should make higher-energy states more accessible and thus increase the specific heat of the fluid. However, this is not the case, and this could be attributed to the lack of vibrational, rotational (and possibly electronic) degrees of freedom for this particular system due to the atomic identities.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of radial distribution functions and their integrals predicted a smooth tendency of the RDF towards unity for a gas, a slightly less smooth tendency for a liquid, and an outright fluctuation of the solid around an average value of unity. This makes sense in all cases: a crystalline solid should not see an equal probability of finding a particle anywhere because it has an ordered structure which means that, in certain points, there will almost never be an atom. However, a gas is much more entropic, so the probability of finding a particle anywhere evens out more rapidly. The coordination number of the solid can easily be found from the value of the integral of the RDF at the first minimum point of the graph. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| 80,000 Atoms || 1,000,000 Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of mean squared displacement against time predicted a smooth, almost-linear increase in MSD (and, thus, the diffusion coefficient) with time, and a higher MSD for gases than liquids and liquids than solids. This absolutely corresponds with scientific reasoning: particles in more disordered states at higher temperatures will experience larger displacements from their original positions. The solid phase especially experiences very little diffusion due to the compact, tightly-bound nature of the particles. However, when comparing the simulations for 80,000 and 1,000,000 atoms, the values diverge. The values for a gas are similar but the values for a solid are significantly lower for more atoms. Looking at the graph reveals some sources: the diffusion coefficient was calculated from the mean of the gradient of the linear portion of the plot, but there are some negative derivative values on the solid line for 1m particles that could skew the data. Furthermore, there could have been a change in density, pressure or temperature parameters when the sample size was increased, all of which would greatly influence the value of the mean-squared displacement.&lt;br /&gt;
&lt;br /&gt;
(574 Words.)&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674408</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674408"/>
		<updated>2018-02-28T08:05:49Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Results and Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical, and were used for 10000 timesteps. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume with temperature for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calculating the radial distribution function for a 15 × 15 × 15 lattice in different phases, the number density and temperature for the solid, liquid and vapour phases were obtained from &#039;Phase Transitions of the Lennard-Jones System&#039;, Jean-Pierre Hansen and Loup Verlet, &#039;&#039;Phys. Rev.&#039;&#039; 184, 151 – Published 5 August 1969. In these calculations, the gas density was 0.073 and temperature 1.5, the liquid density 0.606 and temperature 1.15, and the solid density 0.973 and temperature 0.75. The solid was assigned a face-centred cubic lattice structure. The trajectory files were then used in VMD to calculate the radial distribution function &amp;lt;math display=inline&amp;gt;g(r)&amp;lt;/math&amp;gt; and its integral, which were plotted for different phases against &amp;lt;math display=inline&amp;gt;r&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
When calculating the diffusion coefficient for a 20 × 20 × 20 lattice in different phases, the same density and temperature values from the previous calculations were used to calculate the total particular mean squared displacement, the derivative of which is equivalent to twice the product of the spatial dimensionality and the diffusion coefficient. In this case, the dimensionality is, naturally, three. The mean-square displacement was graphed as a function of time, and the pseudo-linear plots used to calculate a value for the diffusion coefficient. These plots were then compared with identical plots for one million atoms.&lt;br /&gt;
&lt;br /&gt;
(556 Words).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and pressures (in blue colours on the graph) predicted that lower temperatures and lower pressures would produce a lower-density liquid, a logically consistent result. These results were also compared with predictions using the ideal gas law (in red colours), which produced densities much higher than expected: this is because the ideal gas law treats particles as classical Newtonian objects that repel simply through direct contact. The Lennard-Jones model is a more sophisticated way of treating particles that takes electronic repulsions beyond a critical radius into account. The discrepancy between the simulated and calculated data, however, decreased with increasing temperature, as the large thermal energy of the atoms was able to overcome some of the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and densities predicted that the heat capacity of the liquid fell with temperature, and that it was higher with pressure. The latter result is logically consistent, as higher pressure (red on the graph) increases the internal energy of the fluid which means that more energetic states are available to populate, increasing the ability of the substance to absorb energy without heating up. Furthermore the energy states become closer together. However, the former result is very odd, as higher temperature, like higher pressure, should make higher-energy states more accessible and thus increase the specific heat of the fluid. However, this is not the case, and this could be attributed to the lack of vibrational, rotational (and possibly electronic) degrees of freedom for this particular system due to the atomic identities.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of radial distribution functions and their integrals predicted a smooth tendency of the RDF towards unity for a gas, a slightly less smooth tendency for a liquid, and an outright fluctuation of the solid around an average value of unity. This makes sense in all cases: a crystalline solid should not see an equal probability of finding a particle anywhere because it has an ordered structure which means that, in certain points, there will almost never be an atom. However, a gas is much more entropic, so the probability of finding a particle anywhere evens out more rapidly. The coordination number of the solid can easily be found from the value of the integral of the RDF at the first minimum point of the graph. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| 80,000 Atoms || 1,000,000 Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of mean squared displacement against time predicted a smooth, almost-linear increase in MSD (and, thus, the diffusion coefficient) with time, and a higher MSD for gases than liquids and liquids than solids. This absolutely corresponds with scientific reasoning: particles in more disordered states at higher temperatures will experience larger displacements from their original positions. The solid phase especially experiences very little diffusion due to the compact, tightly-bound nature of the particles. However, when comparing the simulations for 80,000 and 1,000,000 atoms, the values diverge. The values for a gas are similar but the values for a solid are significantly lower for more atoms. Looking at the graph reveals some sources: the diffusion coefficient was calculated from the mean of the gradient of the linear portion of the plot, but there are some negative derivative values on the solid line for 1m particles that could skew the data. Furthermore, there could have been a change in density, pressure or temperature parameters when the sample size was increased, all of which would greatly influence the value of the mean-squared displacement.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674403</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674403"/>
		<updated>2018-02-28T07:54:51Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Radial Distribution Function Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical, and were used for 10000 timesteps. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume with temperature for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calculating the radial distribution function for a 15 × 15 × 15 lattice in different phases, the number density and temperature for the solid, liquid and vapour phases were obtained from &#039;Phase Transitions of the Lennard-Jones System&#039;, Jean-Pierre Hansen and Loup Verlet, &#039;&#039;Phys. Rev.&#039;&#039; 184, 151 – Published 5 August 1969. In these calculations, the gas density was 0.073 and temperature 1.5, the liquid density 0.606 and temperature 1.15, and the solid density 0.973 and temperature 0.75. The solid was assigned a face-centred cubic lattice structure. The trajectory files were then used in VMD to calculate the radial distribution function &amp;lt;math display=inline&amp;gt;g(r)&amp;lt;/math&amp;gt; and its integral, which were plotted for different phases against &amp;lt;math display=inline&amp;gt;r&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
When calculating the diffusion coefficient for a 20 × 20 × 20 lattice in different phases, the same density and temperature values from the previous calculations were used to calculate the total particular mean squared displacement, the derivative of which is equivalent to twice the product of the spatial dimensionality and the diffusion coefficient. In this case, the dimensionality is, naturally, three. The mean-square displacement was graphed as a function of time, and the pseudo-linear plots used to calculate a value for the diffusion coefficient. These plots were then compared with identical plots for one million atoms.&lt;br /&gt;
&lt;br /&gt;
(556 Words).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and pressures (in blue colours on the graph) predicted that lower temperatures and lower pressures would produce a lower-density liquid, a logically consistent result. These results were also compared with predictions using the ideal gas law (in red colours), which produced densities much higher than expected: this is because the ideal gas law treats particles as classical Newtonian objects that repel simply through direct contact. The Lennard-Jones model is a more sophisticated way of treating particles that takes electronic repulsions beyond a critical radius into account. The discrepancy between the simulated and calculated data, however, decreased with increasing temperature, as the large thermal energy of the atoms was able to overcome some of the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and densities predicted that the heat capacity of the liquid fell with temperature, and that it was higher with pressure. The latter result is logically consistent, as higher pressure (red on the graph) increases the internal energy of the fluid which means that more energetic states are available to populate, increasing the ability of the substance to absorb energy without heating up. Furthermore the energy states become closer together. However, the former result is very odd, as higher temperature, like higher pressure, should make higher-energy states more accessible and thus increase the specific heat of the fluid. However, this is not the case, and this could be attributed to the lack of vibrational, rotational (and possibly electronic) degrees of freedom for this particular system due to the atomic identities.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674402</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674402"/>
		<updated>2018-02-28T07:54:31Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Results and Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical, and were used for 10000 timesteps. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume with temperature for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calculating the radial distribution function for a 15 × 15 × 15 lattice in different phases, the number density and temperature for the solid, liquid and vapour phases were obtained from &#039;Phase Transitions of the Lennard-Jones System&#039;, Jean-Pierre Hansen and Loup Verlet, &#039;&#039;Phys. Rev.&#039;&#039; 184, 151 – Published 5 August 1969. In these calculations, the gas density was 0.073 and temperature 1.5, the liquid density 0.606 and temperature 1.15, and the solid density 0.973 and temperature 0.75. The solid was assigned a face-centred cubic lattice structure. The trajectory files were then used in VMD to calculate the radial distribution function &amp;lt;math display=inline&amp;gt;g(r)&amp;lt;/math&amp;gt; and its integral, which were plotted for different phases against &amp;lt;math display=inline&amp;gt;r&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
When calculating the diffusion coefficient for a 20 × 20 × 20 lattice in different phases, the same density and temperature values from the previous calculations were used to calculate the total particular mean squared displacement, the derivative of which is equivalent to twice the product of the spatial dimensionality and the diffusion coefficient. In this case, the dimensionality is, naturally, three. The mean-square displacement was graphed as a function of time, and the pseudo-linear plots used to calculate a value for the diffusion coefficient. These plots were then compared with identical plots for one million atoms.&lt;br /&gt;
&lt;br /&gt;
(556 Words).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and pressures (in blue colours on the graph) predicted that lower temperatures and lower pressures would produce a lower-density liquid, a logically consistent result. These results were also compared with predictions using the ideal gas law (in red colours), which produced densities much higher than expected: this is because the ideal gas law treats particles as classical Newtonian objects that repel simply through direct contact. The Lennard-Jones model is a more sophisticated way of treating particles that takes electronic repulsions beyond a critical radius into account. The discrepancy between the simulated and calculated data, however, decreased with increasing temperature, as the large thermal energy of the atoms was able to overcome some of the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and densities predicted that the heat capacity of the liquid fell with temperature, and that it was higher with pressure. The latter result is logically consistent, as higher pressure (red on the graph) increases the internal energy of the fluid which means that more energetic states are available to populate, increasing the ability of the substance to absorb energy without heating up. Furthermore the energy states become closer together. However, the former result is very odd, as higher temperature, like higher pressure, should make higher-energy states more accessible and thus increase the specific heat of the fluid. However, this is not the case, and this could be attributed to the lack of vibrational, rotational (and possibly electronic) degrees of freedom for this particular system due to the atomic identities.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674398</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674398"/>
		<updated>2018-02-28T07:33:18Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Results and Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical, and were used for 10000 timesteps. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume with temperature for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calculating the radial distribution function for a 15 × 15 × 15 lattice in different phases, the number density and temperature for the solid, liquid and vapour phases were obtained from &#039;Phase Transitions of the Lennard-Jones System&#039;, Jean-Pierre Hansen and Loup Verlet, &#039;&#039;Phys. Rev.&#039;&#039; 184, 151 – Published 5 August 1969. In these calculations, the gas density was 0.073 and temperature 1.5, the liquid density 0.606 and temperature 1.15, and the solid density 0.973 and temperature 0.75. The solid was assigned a face-centred cubic lattice structure. The trajectory files were then used in VMD to calculate the radial distribution function &amp;lt;math display=inline&amp;gt;g(r)&amp;lt;/math&amp;gt; and its integral, which were plotted for different phases against &amp;lt;math display=inline&amp;gt;r&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
When calculating the diffusion coefficient for a 20 × 20 × 20 lattice in different phases, the same density and temperature values from the previous calculations were used to calculate the total particular mean squared displacement, the derivative of which is equivalent to twice the product of the spatial dimensionality and the diffusion coefficient. In this case, the dimensionality is, naturally, three. The mean-square displacement was graphed as a function of time, and the pseudo-linear plots used to calculate a value for the diffusion coefficient. These plots were then compared with identical plots for one million atoms.&lt;br /&gt;
&lt;br /&gt;
(556 Words).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
600 Words. Present a result using a method described and discuss what this result means and how your results show it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data from the simulations of specific temperatures and pressures (in blue colours on the graph) predicted that lower temperatures and lower pressures would produce a lower-density liquid, a logically consistent result. These results were also compared with predictions using the ideal gas law (in red colours), which produced densities much higher than expected: this is because the ideal gas law treats particles as classical Newtonian objects that repel simply through direct contact. The Lennard-Jones model is a more sophisticated way of treating particles that takes electronic repulsions beyond a critical radius into account. The discrepancy between the simulated and calculated data, however, decreased with increasing temperature, as the large thermal energy of the atoms was able to overcome some of the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674396</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674396"/>
		<updated>2018-02-28T07:25:42Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Academic Report */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical, and were used for 10000 timesteps. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume with temperature for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calculating the radial distribution function for a 15 × 15 × 15 lattice in different phases, the number density and temperature for the solid, liquid and vapour phases were obtained from &#039;Phase Transitions of the Lennard-Jones System&#039;, Jean-Pierre Hansen and Loup Verlet, &#039;&#039;Phys. Rev.&#039;&#039; 184, 151 – Published 5 August 1969. In these calculations, the gas density was 0.073 and temperature 1.5, the liquid density 0.606 and temperature 1.15, and the solid density 0.973 and temperature 0.75. The solid was assigned a face-centred cubic lattice structure. The trajectory files were then used in VMD to calculate the radial distribution function &amp;lt;math display=inline&amp;gt;g(r)&amp;lt;/math&amp;gt; and its integral, which were plotted for different phases against &amp;lt;math display=inline&amp;gt;r&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
When calculating the diffusion coefficient for a 20 × 20 × 20 lattice in different phases, the same density and temperature values from the previous calculations were used to calculate the total particular mean squared displacement, the derivative of which is equivalent to twice the product of the spatial dimensionality and the diffusion coefficient. In this case, the dimensionality is, naturally, three. The mean-square displacement was graphed as a function of time, and the pseudo-linear plots used to calculate a value for the diffusion coefficient. These plots were then compared with identical plots for one million atoms.&lt;br /&gt;
&lt;br /&gt;
(556 Words).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
600 Words. Present a result using a method described and discuss what this result means and how your results show it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674395</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674395"/>
		<updated>2018-02-28T07:24:35Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Methodology */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical, and were used for 10000 timesteps. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume with temperature for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calculating the radial distribution function for a 15 × 15 × 15 lattice in different phases, the number density and temperature for the solid, liquid and vapour phases were obtained from &#039;Phase Transitions of the Lennard-Jones System&#039;, Jean-Pierre Hansen and Loup Verlet, &#039;&#039;Phys. Rev.&#039;&#039; 184, 151 – Published 5 August 1969. In these calculations, the gas density was 0.073 and temperature 1.5, the liquid density 0.606 and temperature 1.15, and the solid density 0.973 and temperature 0.75. The solid was assigned a face-centred cubic lattice structure. The trajectory files were then used in VMD to calculate the radial distribution function &amp;lt;math display=inline&amp;gt;g(r)&amp;lt;/math&amp;gt; and its integral, which were plotted for different phases against &amp;lt;math display=inline&amp;gt;r&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
When calculating the diffusion coefficient for a 20 × 20 × 20 lattice in different phases, the same density and temperature values from the previous calculations were used to calculate the total particular mean squared displacement, the derivative of which is equivalent to twice the product of the spatial dimensionality and the diffusion coefficient. In this case, the dimensionality is, naturally, three. The mean-square displacement was graphed as a function of time, and the pseudo-linear plots used to calculate a value for the diffusion coefficient. These plots were then compared with identical plots for one million atoms.&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
600 Words. Present a result using a method described and discuss what this result means and how your results show it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674388</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674388"/>
		<updated>2018-02-28T07:07:40Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Methodology */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
320 Words.&lt;br /&gt;
&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
600 Words. Present a result using a method described and discuss what this result means and how your results show it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674387</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674387"/>
		<updated>2018-02-28T07:07:12Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Methodology */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
320 Words.&lt;br /&gt;
&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=centre&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
600 Words. Present a result using a method described and discuss what this result means and how your results show it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674386</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674386"/>
		<updated>2018-02-28T07:06:58Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Methodology */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
320 Words.&lt;br /&gt;
&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;centre&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
600 Words. Present a result using a method described and discuss what this result means and how your results show it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674384</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674384"/>
		<updated>2018-02-28T07:06:26Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Methodology */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
320 Words.&lt;br /&gt;
&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;centre&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2\frac{\left\langle E^2\right\rangle - \left\langle E\right\rangle^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
600 Words. Present a result using a method described and discuss what this result means and how your results show it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674383</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674383"/>
		<updated>2018-02-28T07:05:56Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Methodology */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
320 Words.&lt;br /&gt;
&lt;br /&gt;
Both the Verlet and velocity-Verlet algorithms were used in these simulations, with the initial positions and velocities set for the latter. All particles simulated were identical. The simulations were run using LAMMPS, assuming particle interactions through Lennard-Jones pairwise potentials. The pairwise potential force field coefficients and particular masses were set to unity (in reduced units) and the cutoff point was between 3 and 3.2. Simulations were run for between 1000 and 10000 atoms with periodic boundary conditions enforced, in order to reduce simulation time. The appropriate timestep was determined by equilibration, and a value between 0.002 and 0.0025 was determined to reduce computational time without sacrificing the accuracy offered by smaller timesteps. The same basic script input structure was utilised for each simulation, as below:&lt;br /&gt;
&lt;br /&gt;
* the simulation box geometry was defined, including the lattice type (always simple cubic in this case), the number of repeat lattice units, the number density and the number of atoms&lt;br /&gt;
* the atomic physical properties were defined, including the mass, pairwise potentials, and Lennard-Jones cutoffs&lt;br /&gt;
* the thermodynamic state was established, including temperature and pressure or density&lt;br /&gt;
* the atomic velocities were established using the Maxwell-Boltzmann distribution and the simulation run to melt the crystal&lt;br /&gt;
* the thermodynamic parameters were re-imposed and the physical parameters measured, including temperature and density&lt;br /&gt;
&lt;br /&gt;
When running simulations under specific conditions, the change in density according to temperature for this setup with a 15 × 15 × 15 lattice with number density 0.8 was recorded for temperatures of 2.0, 2.5, 3.0, 3.5 and 4.0 and pressures of 2.0 and 3.0. The true temperature, pressure and density along with standard errors were recorded and graphed. &lt;br /&gt;
&lt;br /&gt;
When calculating heat capacities, the change in heat capacity per unit volume for a 15 × 15 × 15 lattice with number densities 0.2 and 0.8 was recorded for temperatures of 2.0, 2.2, 2.4, 2.6 and 2.8. The true temperature, density, volume and heat capacities were recorded, processed and graphed. The heat capacity was found using its relationship with the energetic variance:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;centre&amp;quot;&amp;gt;&amp;lt;math&amp;gt;C_V = N^2 \frac{\operatorname{Var}E}{k_B T^2} = N^2 \frac{\left \langle E^2 \rangle \right - \langle E \rangle ^2}{k_B T^2}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
600 Words. Present a result using a method described and discuss what this result means and how your results show it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674341</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674341"/>
		<updated>2018-02-28T06:11:11Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Velocity Verlet Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[Media:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
320 Words. You are right, we spend an awful lot of time in this lab changing properties and measuring their physical outputs. I think fundamentally, we explore phase in this lab and the definition of phase. Reproducibility of data reinforces the high standards and quality expected for a piece of work in a peer reviewed journal. It also engenders the work with legitimacy. It is not true that the velocity-Verlet requires the previous position as an input - it requires the starting positions as input parameters and works it&#039;s way from there. We usually do not talk about timestep when writing about computational Chemistry because hopefully we have picked the timestep that simulates the system accurately for the least amount of time. For someone who did not know which software you used, it might be an idea to mention this here. In terms of syntax specific for lammps (pair_style, pair_coeff) this should be discussed in terms of interaction strengths and forcefields rather than the specific syntax. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
600 Words. Present a result using a method described and discuss what this result means and how your results show it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674340</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674340"/>
		<updated>2018-02-28T06:10:30Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Velocity Verlet Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found [[File:Mk HO.xls|here]]. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
320 Words. You are right, we spend an awful lot of time in this lab changing properties and measuring their physical outputs. I think fundamentally, we explore phase in this lab and the definition of phase. Reproducibility of data reinforces the high standards and quality expected for a piece of work in a peer reviewed journal. It also engenders the work with legitimacy. It is not true that the velocity-Verlet requires the previous position as an input - it requires the starting positions as input parameters and works it&#039;s way from there. We usually do not talk about timestep when writing about computational Chemistry because hopefully we have picked the timestep that simulates the system accurately for the least amount of time. For someone who did not know which software you used, it might be an idea to mention this here. In terms of syntax specific for lammps (pair_style, pair_coeff) this should be discussed in terms of interaction strengths and forcefields rather than the specific syntax. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
600 Words. Present a result using a method described and discuss what this result means and how your results show it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Mk_HO.xls&amp;diff=674339</id>
		<title>File:Mk HO.xls</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Mk_HO.xls&amp;diff=674339"/>
		<updated>2018-02-28T06:09:32Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674337</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674337"/>
		<updated>2018-02-28T06:04:04Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Aims and Objectives */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. &lt;br /&gt;
&lt;br /&gt;
(62 Words.)&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
320 Words. You are right, we spend an awful lot of time in this lab changing properties and measuring their physical outputs. I think fundamentally, we explore phase in this lab and the definition of phase. Reproducibility of data reinforces the high standards and quality expected for a piece of work in a peer reviewed journal. It also engenders the work with legitimacy. It is not true that the velocity-Verlet requires the previous position as an input - it requires the starting positions as input parameters and works it&#039;s way from there. We usually do not talk about timestep when writing about computational Chemistry because hopefully we have picked the timestep that simulates the system accurately for the least amount of time. For someone who did not know which software you used, it might be an idea to mention this here. In terms of syntax specific for lammps (pair_style, pair_coeff) this should be discussed in terms of interaction strengths and forcefields rather than the specific syntax. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
600 Words. Present a result using a method described and discuss what this result means and how your results show it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674336</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674336"/>
		<updated>2018-02-28T06:03:52Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Aims and Objectives */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
The aim of this exercise was to simulate particles of an ideal gas in different phases, and compare their properties whilst varying different physical parameters, including particular density and temperature. It was important to the aims of this task that as much thermodynamic data could be extracted from such simulations as possible, as it is this data that can be verified physically. (62 Words.)&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
320 Words. You are right, we spend an awful lot of time in this lab changing properties and measuring their physical outputs. I think fundamentally, we explore phase in this lab and the definition of phase. Reproducibility of data reinforces the high standards and quality expected for a piece of work in a peer reviewed journal. It also engenders the work with legitimacy. It is not true that the velocity-Verlet requires the previous position as an input - it requires the starting positions as input parameters and works it&#039;s way from there. We usually do not talk about timestep when writing about computational Chemistry because hopefully we have picked the timestep that simulates the system accurately for the least amount of time. For someone who did not know which software you used, it might be an idea to mention this here. In terms of syntax specific for lammps (pair_style, pair_coeff) this should be discussed in terms of interaction strengths and forcefields rather than the specific syntax. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
600 Words. Present a result using a method described and discuss what this result means and how your results show it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674334</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674334"/>
		<updated>2018-02-28T05:59:42Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more thermal energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their thermal energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In general, these findings are logically consistent. The mean-squared displacement and thus the diffusion coefficient should be highest for a gas, as the particles have a higher thermal energy and so move away from their original positions fastest. Liquids have lower diffusion coefficients, and solids lower still. However, comparing the simulation for fewer and more atoms reveals some odd data. The diffusion coefficients for the gas phase are relatively similar, with a small increase on the side of the larger sample. This difference in value can simply be attributed to the greater accuracy of the million-atoms calculation. However, the value of &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for the liquid simulation is smaller for one million atoms, and for a solid it is much smaller still (by a magnitude of one hundred thousand). The values should at least be similar, as the parameters are similar, but the sample sizes are different. To rationalise this, it is possible to consider that the value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms. For the case of the liquid, the origin of the difference is difficult to reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Academic Report ==&lt;br /&gt;
&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
100 Words. In the abstract, you should provide an overview of your results so a quick (and naive at this point) data based conclusion can be made on the original hypothesis. It&#039;s a section you write at the end and doesn&#039;t go into as much detail as the conclusion but you sum up the relevance of the research (intro), what you have done, what results do you have to show that you have done this and the ultimate conclusion. Abstract - what do you want to fundamentally do, what have you done, how does this support the original idea.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
Computational chemistry is an extremely broad area of research with wide-reaching implications for modern science. For systems more complex than a hydrogen atom, it is currently impossible to analytically solve the Schrödinger equation, which means that iterative and approximate solutions must be built. This is resource- and time-consuming work, and computation can make quick work of such laborious tasks. As computational simulations simulate real-life data more and more accurately, this gives a way for programmers and scientists to more accurately fine-tune their algorithms, which bequeaths upon them, and, in turn, us, a better quantitative understanding of the quantum mechanisms that govern the behaviour of the microscopic. Conversely, this project in particular uses LAMMPS to model atomic behaviour, which utilises Newtonian approximations rather than purely quantum mechanical ones. This is because it requires far less computationally demanding simulations, and, in spite of the previous comments, this can also be useful: approximating real-life results without huge processing demand is a much easier and quicker alternative. In time, approaches such as these may be improved upon until their results may even match quantum mechanical methods to a large degree of accuracy, and it is to this advancement in classical modelling that this project aims to contribute.&lt;br /&gt;
&lt;br /&gt;
(203 Words)&lt;br /&gt;
&lt;br /&gt;
=== Aims and Objectives ===&lt;br /&gt;
80 Words. We spend an awful lot of time in this lab changing properties and measuring their physical outputs. I think fundamentally, we explore phase in this lab and the definition of phase.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Methodology ===&lt;br /&gt;
320 Words. You are right, we spend an awful lot of time in this lab changing properties and measuring their physical outputs. I think fundamentally, we explore phase in this lab and the definition of phase. Reproducibility of data reinforces the high standards and quality expected for a piece of work in a peer reviewed journal. It also engenders the work with legitimacy. It is not true that the velocity-Verlet requires the previous position as an input - it requires the starting positions as input parameters and works it&#039;s way from there. We usually do not talk about timestep when writing about computational Chemistry because hopefully we have picked the timestep that simulates the system accurately for the least amount of time. For someone who did not know which software you used, it might be an idea to mention this here. In terms of syntax specific for lammps (pair_style, pair_coeff) this should be discussed in terms of interaction strengths and forcefields rather than the specific syntax. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Results and Discussion ===&lt;br /&gt;
600 Words. Present a result using a method described and discuss what this result means and how your results show it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Conclusion ===&lt;br /&gt;
100 Words. Tie up the research and what your results show. Reread your intro, what are you trying to do? How does your research do this?&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674251</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674251"/>
		<updated>2018-02-28T04:23:57Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Dynamical Properties Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These findings are odd. The value for &amp;lt;math display=inline&amp;gt;D&amp;lt;/math&amp;gt; for one million atoms as a solid is skewed due to the presence of negative micro-gradient values, so it is difficult to compare in any valid sense to the computation for fewer atoms.&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674250</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674250"/>
		<updated>2018-02-28T04:21:54Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Dynamical Properties Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 8 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674249</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674249"/>
		<updated>2018-02-28T04:21:37Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Dynamical Properties Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; (m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;s&amp;lt;sup&amp;gt;-1&amp;lt;/sup&amp;gt;) to 3 s.f&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674246</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674246"/>
		<updated>2018-02-28T04:19:29Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Dynamical Properties Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D  \text{(m^2s^{-1})}&amp;lt;/math&amp;gt; (3 s.f)&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674245</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674245"/>
		<updated>2018-02-28T04:18:43Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Dynamical Properties Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
|-&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | &amp;lt;math&amp;gt;D (m^2s^{-1})&amp;lt;/math&amp;gt; (3 s.f)&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674244</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674244"/>
		<updated>2018-02-28T04:18:18Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Dynamical Properties Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | &amp;lt;math&amp;gt;D (m^2s^{-1})&amp;lt;/math&amp;gt; (3 s.f)&lt;br /&gt;
|-&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674242</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674242"/>
		<updated>2018-02-28T04:17:57Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Dynamical Properties Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | &amp;lt;math&amp;gt;D (m^2s^{-1})&amp;lt;/math&amp;gt; (3 s.f)&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674241</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674241"/>
		<updated>2018-02-28T04:17:31Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Dynamical Properties Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Mean Squared Displacement for Varying Phases and Sample Sizes&lt;br /&gt;
| Fewer Atoms || One Million Atoms&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The resulting diffusion coefficients, calculated by the equation below (in which &#039;&#039;n&#039;&#039; is the dimensionality, or 3 in this case), are also tabulated below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \frac{\partial\left\langle r^2\left(t\right)\right\rangle}{\partial t}=2nD&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | &amp;lt;math&amp;gt;D (m^2s^{-1})&amp;lt;/math&amp;gt; (3 s.f)&lt;br /&gt;
| Phase || Small Sample || Large Sample&lt;br /&gt;
|-&lt;br /&gt;
| Solid || 0.010172398 || 5.4978008 × 10&amp;lt;sup&amp;gt;-7&amp;lt;/sup&amp;gt;&lt;br /&gt;
| Liquid || 0.19168932 || 0.088731507&lt;br /&gt;
|-&lt;br /&gt;
| Gas || 2.7676196 || 3.0690123&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674236</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674236"/>
		<updated>2018-02-28T04:03:55Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Radial Distribution Function Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution functions of multiple phases and their integrals are plotted against distance below. The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamical Properties Tasks ==&lt;br /&gt;
&lt;br /&gt;
The mean squared displacements for a small sample and a large sample in different phases are plotted below, and the calculated diffusion coefficients are also tabulated. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk msdt1.png|450px|center]] || [[File:Mk msdt2.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Mk_msdt2.png&amp;diff=674235</id>
		<title>File:Mk msdt2.png</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Mk_msdt2.png&amp;diff=674235"/>
		<updated>2018-02-28T04:03:48Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Mk_msdt1.png&amp;diff=674234</id>
		<title>File:Mk msdt1.png</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Mk_msdt1.png&amp;diff=674234"/>
		<updated>2018-02-28T04:03:30Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674199</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674199"/>
		<updated>2018-02-28T03:02:42Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Radial Distribution Function Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
The radial distribution function for these simulations should average out to one, irrespective of the phase, because the function itself is a measure of the particle density surrounding a given particle. Consequently it can be seen as a measure of how consistently structured a material is: for a gas, the position of the particles is completely unpredictable and so it will very quickly tend to a central value. However, for a crystalline solid, the peaks will average unity but will never become a straight line that tend to unity, because the crystal has a defined structure with particles a fixed distance away from each other. Henceforth, there is a much greater probability that a particle will be found in a lattice site than outside of one, so the RDF will never lose its &#039;bumpiness&#039;. From this line of reasoning, the RDF of a simple liquid should tend to unity but slower than the same function for a gas. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To find the coordination number, the value of the first minimum on the RDF of the solid is found (which appears at &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r=1.975&amp;lt;/math&amp;gt;), which equates to a coordination number of 12. The lattice spacing, consequently, is ca. 1.37.&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674183</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674183"/>
		<updated>2018-02-28T02:37:56Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Radial Distribution Function Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|200px]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674182</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674182"/>
		<updated>2018-02-28T02:37:34Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Radial Distribution Function Tasks ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | RDF and Integrated RDF for Three Phases&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk rdfr1.png|450px|center]] || [[File:Mk intrdfr1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | [[File:Mk key1.png|400px]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Mk_key1.png&amp;diff=674179</id>
		<title>File:Mk key1.png</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Mk_key1.png&amp;diff=674179"/>
		<updated>2018-02-28T02:37:00Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Mk_intrdfr1.png&amp;diff=674177</id>
		<title>File:Mk intrdfr1.png</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Mk_intrdfr1.png&amp;diff=674177"/>
		<updated>2018-02-28T02:35:37Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Mk_rdfr1.png&amp;diff=674173</id>
		<title>File:Mk rdfr1.png</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Mk_rdfr1.png&amp;diff=674173"/>
		<updated>2018-02-28T02:33:42Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674061</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674061"/>
		<updated>2018-02-27T23:50:58Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Statistical Physics Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674059</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674059"/>
		<updated>2018-02-27T23:50:37Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Statistical Physics Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev/ here]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674057</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674057"/>
		<updated>2018-02-27T23:49:33Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Statistical Physics Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. An exemplar script can be found [here|https://wiki.ch.ic.ac.uk/wiki/index.php?title=Script_examples_with_milandeleev]. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Script_examples_with_milandeleev&amp;diff=674053</id>
		<title>Script examples with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Script_examples_with_milandeleev&amp;diff=674053"/>
		<updated>2018-02-27T23:48:40Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: Created page with &amp;quot;== Statistical Physics Simulation ==  &amp;lt;pre&amp;gt;  ### DEFINE SIMULATION BOX GEOMETRY ### variable density equal 0.8 lattice sc ${density} region box block 0 15 0 15 0 15 create_box...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Statistical Physics Simulation ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal 0.8&lt;br /&gt;
lattice sc ${density}&lt;br /&gt;
region box block 0 15 0 15 0 15&lt;br /&gt;
create_box 1 box&lt;br /&gt;
create_atoms 1 box&lt;br /&gt;
&lt;br /&gt;
### DEFINE PHYSICAL PROPERTIES OF ATOMS ###&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut/opt 3.0&lt;br /&gt;
pair_coeff 1 1 1.0 1.0&lt;br /&gt;
neighbor 2.0 bin&lt;br /&gt;
&lt;br /&gt;
### SPECIFY THE REQUIRED THERMODYNAMIC STATE ###&lt;br /&gt;
variable T equal 2.0&lt;br /&gt;
variable timestep equal 0.0025&lt;br /&gt;
&lt;br /&gt;
### ASSIGN ATOMIC VELOCITIES ###&lt;br /&gt;
velocity all create ${T} 12345 dist gaussian rot yes mom yes&lt;br /&gt;
&lt;br /&gt;
### SPECIFY ENSEMBLE ###&lt;br /&gt;
timestep ${timestep}&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
### THERMODYNAMIC OUTPUT CONTROL ###&lt;br /&gt;
thermo_style custom time etotal temp press&lt;br /&gt;
thermo 10&lt;br /&gt;
&lt;br /&gt;
### RECORD TRAJECTORY ###&lt;br /&gt;
dump traj all custom 1000 output-1 id x y z&lt;br /&gt;
&lt;br /&gt;
### SPECIFY TIMESTEP ###&lt;br /&gt;
&lt;br /&gt;
### RUN SIMULATION TO MELT CRYSTAL ###&lt;br /&gt;
run 10000&lt;br /&gt;
unfix nve&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
### BRING SYSTEM TO REQUIRED STATE ###&lt;br /&gt;
variable tdamp equal ${timestep}*100&lt;br /&gt;
fix nvt all nvt temp ${T} ${T} ${tdamp} &lt;br /&gt;
run 10000&lt;br /&gt;
reset_timestep 0&lt;br /&gt;
&lt;br /&gt;
unfix nvt&lt;br /&gt;
fix nve all nve&lt;br /&gt;
&lt;br /&gt;
### MEASURE SYSTEM STATE ###&lt;br /&gt;
thermo_style custom step etotal temp density atoms vol&lt;br /&gt;
variable volume equal vol&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable energy equal etotal&lt;br /&gt;
variable energy2 equal etotal*etotal&lt;br /&gt;
variable atoms2 equal atoms*atoms&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_dens2 v_temp2 v_energy v_energy2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable cp equal ${atoms2}*(f_aves[6]-f_aves[5]*f_aves[5])/f_aves[4]&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable errdens equal sqrt(abs(f_aves[4]-f_aves[1]*f_aves[1]))&lt;br /&gt;
variable errtemp equal sqrt(abs(f_aves[5]-f_aves[2]*f_aves[2]))&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Averages&amp;quot;&lt;br /&gt;
print &amp;quot;--------&amp;quot;&lt;br /&gt;
print &amp;quot;Heat Capacity: ${cp}&amp;quot;&lt;br /&gt;
print &amp;quot;Volume: ${volume}&amp;quot;&lt;br /&gt;
print &amp;quot;Density: ${avedens}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errdens}&amp;quot;&lt;br /&gt;
print &amp;quot;Temperature: ${avetemp}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errtemp}&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674050</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674050"/>
		<updated>2018-02-27T23:47:01Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Statistical Physics Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of the Variation of Heat Capacities per Unit Volume with Temperature for Varying Densities&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674047</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674047"/>
		<updated>2018-02-27T23:46:07Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Statistical Physics Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperatureheatcap1.png|700px|center]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674045</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=674045"/>
		<updated>2018-02-27T23:45:30Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Statistical Physics Tasks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;br /&gt;
&lt;br /&gt;
In this section, ten simulations were again run to determine the change in heat capacity per unit volume for a liquid at varying densities. The results are graphed below. Higher density very obviously produces a higher heat capacity, which is expected because more atoms in one space can absorb more heat energy than fewer atoms in the same space. There is a clear decrease in the heat capacity with increasing temperature, which is at odds with the physical predictions. At lower temperatures, there are fewer thermally accessible translational, rotational, electronic and vibrational energy levels available. As temperature increases, more of these states become available so more of the energy levels become populated, making the internal energy rise rapidly. Since the heat capacity is the derivative of the internal energy with respect to temperature, higher temperatures are thus expected to increase the heat capacity (although this does level out towards the phase transition temperature). This deviation from the expected trend could possibly be explained by the fact that this system is modelling simple hydrogen atom fluids, and thus rotational and vibrational energy levels are not available. Furthermore the software itself may not take into account electronic transitions.&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Mk_temperatureheatcap1.png&amp;diff=673967</id>
		<title>File:Mk temperatureheatcap1.png</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Mk_temperatureheatcap1.png&amp;diff=673967"/>
		<updated>2018-02-27T22:43:01Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=673048</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=673048"/>
		<updated>2018-02-27T04:32:39Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Statistical Physics Tasks ==&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=673022</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=673022"/>
		<updated>2018-02-27T03:07:44Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Plotting the Equations of State */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=673020</id>
		<title>Rep:Liquid Simulations with milandeleev</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Liquid_Simulations_with_milandeleev&amp;diff=673020"/>
		<updated>2018-02-27T03:07:26Z</updated>

		<summary type="html">&lt;p&gt;Mk2815: /* Plotting the Equations of State */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introductory Tasks ==&lt;br /&gt;
=== Velocity Verlet Algorithm ===&lt;br /&gt;
A completed spreadsheet containing a model of this algorithm for a simple harmonic oscillator may be found here. The position of local maximum error with respect to time can be modelled by the following equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\max(E)=(5t-1)\cdot 8\times 10^{-5} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to ensure that the total energy does not change by more than 1%, the timestep used must deceed 0.3 s. This lack of deviation is very important, as it ensures that the system obeys the law of conservation of energy, which means that it behaves in a physically consistent manner. In terms of the simple harmonic oscillator, then, it ensures that the observed wave frequency and period is constant due to the below equation:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;E=h\nu&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Derivatives ===&lt;br /&gt;
A single Lennard-Jones potential reaches zero when the internuclear separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;. This can be calculated by following the below process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi(r)=4\epsilon\left ( \frac{\sigma^{12}}{r_0^{12}} - \frac{\sigma^6}{r_0^6}\right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\sigma^{12}}{r_0^{12}}=\frac{\sigma^6}{r_0^6}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0^{12}\sigma^6=r_0^6\sigma^{12}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the force at this separation, it must be known that the force is the negative derivative of the energy with respect to the internuclear separation. Hence:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt; F = - \frac{\mathrm{d}\phi}{\mathrm{d}r}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;-\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r^7}\left (\frac{2\sigma^6}{r^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Substituting in &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_0=\sigma&amp;lt;/math&amp;gt;, then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon\sigma^6}{\sigma^7}\left (\frac{2\sigma^6}{\sigma^6}-1 \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;F_0=\frac{24\epsilon}{\sigma}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To calculate the equilibrium separation &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r_{eq}&amp;lt;/math&amp;gt;, the minimum point of the energy curve must be found. This can be achieved by differentiating the equation and equating it to zero, and solving for &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;r&amp;lt;/math&amp;gt;, which is equivalent to finding the location whereat &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;F=0&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\mathrm{d}\phi}{\mathrm{d}r}=\frac{24\epsilon\sigma^6}{r_{eq}^7}\left (1-\frac{2\sigma^6}{r_{eq}^6} \right )=0&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{2\sigma^6}{r_{eq}^6}=1&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;2\sigma^6=r_{eq}^6&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r_{eq}=2^{\frac{1}{6}}\sigma&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The well depth &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;\phi \left ( r_{eq} \right )&amp;lt;/math&amp;gt; thereof:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left (  \frac{\sigma^{12}}{r_{eq}^{12}} - \frac{\sigma^6}{r_{eq}^6}\right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{\sigma^{12}}{ \left (2^{\frac{1}{6}}\sigma \right )^{12}} - \frac{\sigma^6}{\left ( 2^{\frac{1}{6}}\sigma \right )^6} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = 4\epsilon\left ( \frac{1}{4} - \frac{1}{2} \right )&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\phi \left ( r_{eq} \right ) = \epsilon&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Atomic Forces and Integrals ===&lt;br /&gt;
The integral below is a generalised form to which boundary conditions can be applied.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=\int\limits_{L_1}^{L_2} 4\epsilon\left ( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6}\right )\mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r) =4\epsilon\sigma^{12} \int\limits_{L_1}^{L_2} r^{-12} \mathrm{d}r - 4\epsilon\sigma^{6}\int\limits_{L_1}^{L_2} r^{-6} \mathrm{d}r&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{L_2} \phi(r)=4\epsilon\sigma^{6} \left [ \frac {1}{5r^5} - \frac{\sigma^{6}}{11r^{11}} \right ]_{L_1}^{L_2} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The limits &amp;lt;math display=inline&amp;gt;L_1=\{2\sigma, 2.5\sigma, 3\sigma\}&amp;lt;/math&amp;gt; and &amp;lt;math display=inline&amp;gt;L_2=\infty&amp;lt;/math&amp;gt; can be applied as below. The final results apply for &amp;lt;math display=inline&amp;gt;\sigma=\epsilon=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;L_2=\infty \therefore \left ( \frac {1}{5(\infty)^5} - \frac{\sigma^{6}}{11(\infty)^{11}} \right ) = 0 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{L_1}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {\sigma^6}{11L_1^{11}} - \frac {1}{5L_1^5} \right ) = 4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11L_1^6}{55L_1^{11}} \right )  &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2\sigma)^6}{55(2\sigma)^{11}} \right ) = -\frac{699\sigma \epsilon}{28160} = -0.0248 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{2.5\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {5\sigma^6-11(2.5\sigma)^6}{55(2.5\sigma)^{11}} \right ) = -\frac{4391808\sigma \epsilon}{537109375} = -0.00818 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\int\limits_{3\sigma}^{\infty} \phi(r)=4\epsilon\sigma^6 \left ( \frac {3\sigma^6-11(2.5\sigma)^6}{55(3\sigma)^{11}} \right ) = -\frac{32056\sigma \epsilon}{9743085} = -0.00329 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Periodic Boundary Conditions ===&lt;br /&gt;
1 mL of water at STP has a mass of 1 g. Consequently, the number of moles of water in such a volume &#039;&#039;n&#039;&#039; and the number of molecules &#039;&#039;N&#039;&#039; is calculated below. The final result is &#039;&#039;N&#039;&#039; = 3.43 × 10&amp;lt;sup&amp;gt;23&amp;lt;/sup&amp;gt; molecules. &amp;lt;br /&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{m}{M_r} = \frac{1}{18.01528} = 0.0555084350618 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;N = n \cdot N_A = 0.0555084350618 \cdot 6.022140857 \times 10^{23} \approxeq 3.343 \times 10^{22} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The calculation for the volume of 10000 molecules of water at STP is below. The final result is 2.99 × 10&amp;lt;sup&amp;gt;-19&amp;lt;/sup&amp;gt; mL. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;n = \frac{N}{N_A} = \frac{10000}{6.022140857 \times 10^{23}} = 1.6605390404272 \times 10^-20 &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;V = m = n\cdot M_r = 1.6605390404272 \times 10^{-20} \cdot 18.01528 \approxeq 2.992 \times 10^{-19} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an atom at (0.5, 0.5, 0.5) in a unit cube with repetitive boundary conditions (like the game Snake) moves along a vector of (0.7, 0.6, 0.2), it will reappear in the cube at (0.2, 0.1, 0.7).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reduced Units ===&lt;br /&gt;
For argon, the Lennard-Jones parameters are &#039;&#039;σ&#039;&#039; = 0.34 nm and &#039;&#039;ϵ&#039;&#039; = 120&#039;&#039;k&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;B&#039;&#039;&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;r = r^* \cdot \sigma = 3.2 \cdot 0.34 = 1.088 \text{ nm} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\epsilon = 120k_B = 1.656778224 \times 10^{-21} J \approxeq -2.751 \times 10^{-48} \text { kJ/mol} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;text-align: center;&amp;quot;&amp;gt;&amp;lt;math&amp;gt;T=T^*\frac{\epsilon}{k_B} = 1.5 \cdot 120 = 180\text{ K} &amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Equilibration Tasks ==&lt;br /&gt;
=== Creating the Simulation Box ===&lt;br /&gt;
If atoms are generated with random coordinates, one atom could be generated in a position that overlaps with another atom. This would dramatically increase the overall energy due to intra-pair repulsive potentials, destabilising the system.&lt;br /&gt;
&lt;br /&gt;
A relative lattice spacing of 1.07722 for a simple cubic lattice (1 lattice point per unit cell) generates a lattice point per unit volume density of 0.79999. Generating an atom at each lattice point for a 10×10×10 box produces 1000 atoms. A relative lattice spacing of 1.49380 for a face-centered cubic lattice (4 lattice points per unit cell) generates a lattice point per unit volume density of 1.2. Generating an atom at each lattice point for a 10×10×10 box produces 4000 atoms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting the Properties of the Atoms ===&lt;br /&gt;
The following commands in LAMMPS have specific functions, as described below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mass 1 1.0&amp;lt;/pre&amp;gt; This command creates a type 1 atom with mass 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_style lj/cut 3.0&amp;lt;/pre&amp;gt; This command instructs the program to compute Leonard-Jones pairwise potentials, using a cutoff point of 3.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;pair_coeff * * 1.0 1.0&amp;lt;/pre&amp;gt; This command gives the force field coefficients (&#039;&#039;ϵ&#039;&#039; and &#039;&#039;σ&#039;&#039;) between two type 1 atoms.&lt;br /&gt;
&lt;br /&gt;
As the initial positions and velocities have been specified, this is consistent with the Velocity-Verlet algorithm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Running the Simulation ===&lt;br /&gt;
Using piece of code that references the input value means that the rest of the code need not be altered when the input is altered. Furthermore, other values that depend on the given timestep can also be linked straight back to the input value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Checking Equilibration ===&lt;br /&gt;
The simulation data of total particular energy, temperature and pressure against time for a 0.001 s timestep are graphed below (in that order). The simulation reaches a clear equilibrium for all three values, as, after a short period of time (ca. 0.03 s, or 30 timesteps). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;3&amp;quot; | Simulation Data&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk energytime1.png|450px|center]] || [[File:Mk pressuretime1.png|450px|center]] || [[File:Mk temperaturetime1.png|450px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The data for different timesteps is graphed below. It is clear that the data for the 0.001 s and 0.0025 s are very similar and can essentially be used interchangeably. In the case of simulations over long periods of time, the 0.0025 s timestep is appropriate to reduce computation time but still maintain a high level of accuracy (the mean energy value differs by 0.005%). The 0.015 s timestep does not reach an average energy value, but instead continually increases the total particular energy with time: indicative of an unstable, positively feeding-back system. The Velocity-Verlet algorithm requires the initial atomic positions and velocities, and then simulates molecular movement from there. A large timestep results in large atomic displacements per timestep, causing a significant error in the calculation which multiplies by each timestep.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Comparison of Total Particular Energies for Different Timesteps&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk timesteptime1.png|700px|center]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Specific Condition Simulations Tasks ==&lt;br /&gt;
&lt;br /&gt;
=== Thermostats and Barostats ===&lt;br /&gt;
Setting γ as the velocity scaling factor to inter-convert between the instantaneous and target temperatures allows elucidation of its value in terms of the latter.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \gamma^2 v_i^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{\frac{1}{2}\sum_i m_i \gamma^2 v_i^2} = \frac{\frac{3}{2} N k_B T}{\frac{3}{2} N k_B \mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\frac{1}{\gamma^2} = \frac{T}{\mathfrak{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt; \gamma = \pm \sqrt{\frac{\mathfrak{T}}{T}}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Examining the Input Script ===&lt;br /&gt;
In the program input scripts for the simulations in this section, there exists a line of code that resembles that below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first numerical variable (100 in this case) represents the number of timesteps τ&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; over which an average is taken. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\bar{v} _n = \frac {\sum_i \tau_i}{100}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second numerical variable (1000 in this case) represents the number of averages over which to take a further average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\tilde{v} _i = \frac {\sum_n \bar{v} _n}{1000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The third numerical variable (10000 in this case) represents the number of previous averages over which to take the final average. Mathematically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\hat{v} _a = \frac {\sum_i \tilde{v} _i}{10000}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Plotting the Equations of State ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;\rho = \frac {p}{T}&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data generated from the simulations in this section have been plotted in terms of temperature and density at reduced pressures 2 and 3 in the graph below (with error bars included). The ideal density calculated by the ideal gas law in reduced units (as above) is also plotted. The graph shows a clear discrepancy between the predicted and simulated densities, which is due to the ideal gas law treating the atoms as classical hard balls that experience no repulsion unless they are in direct contact (bouncing off each other). However, the Lennard-Jones potential models the atoms more faithfully to reality, in that, within a critical radius, the electrons orbiting the atoms repel each other and the atoms experience net repulsion. The densities predicted by the ideal gas are consequently higher as they do not take neighbour repulsions into consideration, which means that the model predicts that the atoms can be within closer proximities of one another without destabilising the system. &lt;br /&gt;
&lt;br /&gt;
However, it is also clear that the discrepancy decreases with increasing temperature. This is because, at higher temperatures, the atoms have more kinetic energy and thus behave more like Newtonian hard balls, as their kinetic energy is dominant over the repulsive electronic forces until a smaller distance. Essentially, the atoms can get closer as their kinetic energy can overcome the electronic repulsion.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable floatcentre&amp;quot; style=&amp;quot;text-align: center; margin-left: auto; margin-right: auto&amp;quot; border=1&lt;br /&gt;
! colspan=&amp;quot;1&amp;quot; | Computed and Ideal Densities at varying Temperatures and Pressures&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Mk temperaturedensity1.png|700px|center]]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mk2815</name></author>
	</entry>
</feed>