<?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=Fp813</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=Fp813"/>
	<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/wiki/Special:Contributions/Fp813"/>
	<updated>2026-04-20T09:39:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518568</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518568"/>
		<updated>2015-12-04T21:40:50Z</updated>

		<summary type="html">&lt;p&gt;Fp813: /* Dynamical properties and the diffusion coefficient */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IEIEIEIEIIEIEIEIE.PNG]]&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lelelelele.PNG]][[File:Momomom.PNG]] &lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Hadfdfhaha.PNG]][[File:Eroroor.PNG]]&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. It is important to model the energy of a system you are modelling because in some cases it can be used to calculate thermodynamic quantities as energy is what will dictate how things behave.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
*At this seperation, the force is &amp;lt;math&amp;gt; \frac{-24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{dU}{r} = 4\epsilon \left(\frac{-12\sigma^{12}}{r^{13}} + \frac{-6\sigma^6}{r^7}\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \sigma = r = r_0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = 24\epsilon \left(\frac{-2}{r_0} + \frac{1}{r_0}\right) = -\frac{24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The equilibrium seperation, &amp;lt;math&amp;gt;r = r_{eq}&amp;lt;/math&amp;gt; occurs at the bottom of the well, so force is at a minimum.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;F = \frac{dU}{r} = 0 = 4\epsilon \left(\frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{12\sigma^{12}}{r_{eq}^{13}} = \frac{6\sigma^6}{r_{eq}^7}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq}^6 = 2\sigma^6 = 2 r_0^6&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2} = 1.122 r_0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{r_{eq}^{12}} - \frac{r_0^6}{r_{eq}^6}\right) &amp;lt;/math&amp;gt; and from just above &amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{2^6r_{0}^{12}} - \frac{r_0^6}{2r_0^6}\right) = 4\epsilon\left(\frac{1}{2^6} - \frac{1}{2}\right) = 1.936\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{n}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Specifying variables rather than numerical values useful is because you may need to use that value at various points throughout the script. Using numerical values all over the script would become particularly annoying if you were running lots of simulations with the same variable multiple times as you would have to look through the whole script to find each value but with the dollar command you can just change it once. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
The script used to calculate the heat capacities is below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Heatcap2.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
[[File:MSDgas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 4.17 \times 10^{-4} m^2 timestep{^-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MSDliq.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:MSDsolid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 1.33 \times 10^{-6} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Millison msd gas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0305 = 0.00508 m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd liquid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd solid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 6 \times 10^{-8} = 1 \times 10^{-8} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; x\left(t\right) = A\cos\left(\omega t + \phi\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; x&#039;\left(t\right) = v(t) = -A\omega\sin\left(\omega t + \phi\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; v^2(t) = A^2\omega\sin^2\left(\omega t + \phi\right)&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; v(t+\tau) = -A\omega\sin\left(\omega t + \omega\tau + \phi\right)&amp;lt;/math&amp;gt;  define: &amp;lt;math&amp;gt;\alpha = \omega t + \phi&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; v(t+\tau) = -A\omega\sin\left(\alpha + \omega\tau \right) = - A\omega\sin\left(\alpha\right)\cos\left(\omega\tau\right)\sin\left(\omega\tau\right)\cos\left(\alpha\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t} = \frac{\int_{-\infty}^{\infty} A^2\omega^2\sin^2\left(\alpha\right)\cos\left(\omega\tau\right) + \sin\left(\omega\tau\right)\cos\left(\alpha\right)\mathrm{d}\alpha}{\int_{-\infty}^{\infty}A^2\omega\sin^2\left(\alpha\right)\mathrm{d}\alpha}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518547</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518547"/>
		<updated>2015-12-04T21:10:56Z</updated>

		<summary type="html">&lt;p&gt;Fp813: /* Introduction to Molecular Dynamics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IEIEIEIEIIEIEIEIE.PNG]]&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lelelelele.PNG]][[File:Momomom.PNG]] &lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Hadfdfhaha.PNG]][[File:Eroroor.PNG]]&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. It is important to model the energy of a system you are modelling because in some cases it can be used to calculate thermodynamic quantities as energy is what will dictate how things behave.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
*At this seperation, the force is &amp;lt;math&amp;gt; \frac{-24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{dU}{r} = 4\epsilon \left(\frac{-12\sigma^{12}}{r^{13}} + \frac{-6\sigma^6}{r^7}\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \sigma = r = r_0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = 24\epsilon \left(\frac{-2}{r_0} + \frac{1}{r_0}\right) = -\frac{24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The equilibrium seperation, &amp;lt;math&amp;gt;r = r_{eq}&amp;lt;/math&amp;gt; occurs at the bottom of the well, so force is at a minimum.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;F = \frac{dU}{r} = 0 = 4\epsilon \left(\frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{12\sigma^{12}}{r_{eq}^{13}} = \frac{6\sigma^6}{r_{eq}^7}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq}^6 = 2\sigma^6 = 2 r_0^6&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2} = 1.122 r_0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{r_{eq}^{12}} - \frac{r_0^6}{r_{eq}^6}\right) &amp;lt;/math&amp;gt; and from just above &amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{2^6r_{0}^{12}} - \frac{r_0^6}{2r_0^6}\right) = 4\epsilon\left(\frac{1}{2^6} - \frac{1}{2}\right) = 1.936\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{n}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Specifying variables rather than numerical values useful is because you may need to use that value at various points throughout the script. Using numerical values all over the script would become particularly annoying if you were running lots of simulations with the same variable multiple times as you would have to look through the whole script to find each value but with the dollar command you can just change it once. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
The script used to calculate the heat capacities is below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Heatcap2.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
[[File:MSDgas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 4.17 \times 10^{-4} m^2 timestep{^-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MSDliq.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:MSDsolid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 1.33 \times 10^{-6} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Millison msd gas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0305 = 0.00508 m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd liquid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd solid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 6 \times 10^{-8} = 1 \times 10^{-8} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518545</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518545"/>
		<updated>2015-12-04T21:10:01Z</updated>

		<summary type="html">&lt;p&gt;Fp813: /* Introduction to Molecular Dynamics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IEIEIEIEIIEIEIEIE.PNG]]&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lelelelele.PNG]][[File:Momomom.PNG]] &lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Hadfdfhaha.PNG]][[File:Eroroor.PNG]]&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. It is important to model the energy of a system you are modelling because in some cases it can be used to calculate thermodynamic quantities as energy is what will dictate how things behave.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
*At this seperation, the force is &amp;lt;math&amp;gt; \frac{-24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{dU}{r} = 4\epsilon \left(\frac{-12\sigma^{12}}{r^{13}} + \frac{-6\sigma^6}{r^7}\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \sigma = r = r_0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = 24\epsilon \left(\frac{-2}{r_0} + \frac{1}{r_0}\right) = -\frac{24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The equilibrium seperation, &amp;lt;math&amp;gt;r = r_eq&amp;lt;/math&amp;gt; occurs at the bottom of the well, so force is at a minimum.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;F = \frac{dU}{r} = 0 = 4\epsilon \left(\frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{12\sigma^{12}}{r_{eq}^{13}} = \frac{6\sigma^6}{r_{eq}^7}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq}^6 = 2\sigma^6 = 2 r_0^6&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2} = 1.122 r_0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{r_{eq}^{12}} - \frac{r_0^6}{r_{eq}^6}\right) &amp;lt;/math&amp;gt; and from just above &amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{2^6r_{0}^{12}} - \frac{r_0^6}{2r_0^6}\right) = 4\epsilon\left(\frac{1}{2^6} - \frac{1}{2}\right) = 1.936\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{n}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Specifying variables rather than numerical values useful is because you may need to use that value at various points throughout the script. Using numerical values all over the script would become particularly annoying if you were running lots of simulations with the same variable multiple times as you would have to look through the whole script to find each value but with the dollar command you can just change it once. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
The script used to calculate the heat capacities is below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Heatcap2.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
[[File:MSDgas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 4.17 \times 10^{-4} m^2 timestep{^-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MSDliq.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:MSDsolid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 1.33 \times 10^{-6} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Millison msd gas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0305 = 0.00508 m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd liquid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd solid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 6 \times 10^{-8} = 1 \times 10^{-8} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518543</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518543"/>
		<updated>2015-12-04T21:08:51Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IEIEIEIEIIEIEIEIE.PNG]]&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lelelelele.PNG]][[File:https://wiki.ch.ic.ac.uk/wiki/index.php?title=File:Momomom.PNG]]&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Hadfdfhaha.PNG]][[File:Eroroor.PNG]]&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. It is important to model the energy of a system you are modelling because in some cases it can be used to calculate thermodynamic quantities as energy is what will dictate how things behave.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
*At this seperation, the force is &amp;lt;math&amp;gt; \frac{-24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{dU}{r} = 4\epsilon \left(\frac{-12\sigma^{12}}{r^{13}} + \frac{-6\sigma^6}{r^7}\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \sigma = r = r_0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = 24\epsilon \left(\frac{-2}{r_0} + \frac{1}{r_0}\right) = -\frac{24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The equilibrium seperation, &amp;lt;math&amp;gt;r = r_eq&amp;lt;/math&amp;gt; occurs at the bottom of the well, so force is at a minimum.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;F = \frac{dU}{r} = 0 = 4\epsilon \left(\frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{12\sigma^{12}}{r_{eq}^{13}} = \frac{6\sigma^6}{r_{eq}^7}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq}^6 = 2\sigma^6 = 2 r_0^6&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2} = 1.122 r_0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{r_{eq}^{12}} - \frac{r_0^6}{r_{eq}^6}\right) &amp;lt;/math&amp;gt; and from just above &amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{2^6r_{0}^{12}} - \frac{r_0^6}{2r_0^6}\right) = 4\epsilon\left(\frac{1}{2^6} - \frac{1}{2}\right) = 1.936\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{n}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Specifying variables rather than numerical values useful is because you may need to use that value at various points throughout the script. Using numerical values all over the script would become particularly annoying if you were running lots of simulations with the same variable multiple times as you would have to look through the whole script to find each value but with the dollar command you can just change it once. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
The script used to calculate the heat capacities is below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Heatcap2.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
[[File:MSDgas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 4.17 \times 10^{-4} m^2 timestep{^-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MSDliq.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:MSDsolid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 1.33 \times 10^{-6} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Millison msd gas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0305 = 0.00508 m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd liquid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd solid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 6 \times 10^{-8} = 1 \times 10^{-8} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Momomom.PNG&amp;diff=518542</id>
		<title>File:Momomom.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Momomom.PNG&amp;diff=518542"/>
		<updated>2015-12-04T21:08:12Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518539</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518539"/>
		<updated>2015-12-04T21:06:29Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IEIEIEIEIIEIEIEIE.PNG]]&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lelelelele.PNG]][[File:https://wiki.ch.ic.ac.uk/wiki/index.php?title=File:Workplease.PNG]]&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Hadfdfhaha.PNG]][[File:Eroroor.PNG]]&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. It is important to model the energy of a system you are modelling because in some cases it can be used to calculate thermodynamic quantities as energy is what will dictate how things behave.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
*At this seperation, the force is &amp;lt;math&amp;gt; \frac{-24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{dU}{r} = 4\epsilon \left(\frac{-12\sigma^{12}}{r^{13}} + \frac{-6\sigma^6}{r^7}\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \sigma = r = r_0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = 24\epsilon \left(\frac{-2}{r_0} + \frac{1}{r_0}\right) = -\frac{24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The equilibrium seperation, &amp;lt;math&amp;gt;r = r_eq&amp;lt;/math&amp;gt; occurs at the bottom of the well, so force is at a minimum.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;F = \frac{dU}{r} = 0 = 4\epsilon \left(\frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{12\sigma^{12}}{r_{eq}^{13}} = \frac{6\sigma^6}{r_{eq}^7}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq}^6 = 2\sigma^6 = 2 r_0^6&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2} = 1.122 r_0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{r_{eq}^{12}} - \frac{r_0^6}{r_{eq}^6}\right) &amp;lt;/math&amp;gt; and from just above &amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{2^6r_{0}^{12}} - \frac{r_0^6}{2r_0^6}\right) = 4\epsilon\left(\frac{1}{2^6} - \frac{1}{2}\right) = 1.936\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{n}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Specifying variables rather than numerical values useful is because you may need to use that value at various points throughout the script. Using numerical values all over the script would become particularly annoying if you were running lots of simulations with the same variable multiple times as you would have to look through the whole script to find each value but with the dollar command you can just change it once. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
The script used to calculate the heat capacities is below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Heatcap2.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
[[File:MSDgas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 4.17 \times 10^{-4} m^2 timestep{^-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MSDliq.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:MSDsolid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 1.33 \times 10^{-6} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Millison msd gas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0305 = 0.00508 m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd liquid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd solid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 6 \times 10^{-8} = 1 \times 10^{-8} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Workplease.PNG&amp;diff=518521</id>
		<title>File:Workplease.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Workplease.PNG&amp;diff=518521"/>
		<updated>2015-12-04T20:41:38Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518517</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518517"/>
		<updated>2015-12-04T20:39:24Z</updated>

		<summary type="html">&lt;p&gt;Fp813: /* Introduction to Molecular Dynamics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IEIEIEIEIIEIEIEIE.PNG]]&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Lelelelele.PNG]][[File:https://wiki.ch.ic.ac.uk/wiki/index.php?title=File:Erororororor.PNG]]&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Hadfdfhaha.PNG]][[File:Eroroor.PNG]]&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. It is important to model the energy of a system you are modelling because in some cases it can be used to calculate thermodynamic quantities as energy is what will dictate how things behave.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
*At this seperation, the force is &amp;lt;math&amp;gt; \frac{-24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{dU}{r} = 4\epsilon \left(\frac{-12\sigma^{12}}{r^{13}} + \frac{-6\sigma^6}{r^7}\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \sigma = r = r_0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = 24\epsilon \left(\frac{-2}{r_0} + \frac{1}{r_0}\right) = -\frac{24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The equilibrium seperation, &amp;lt;math&amp;gt;r = r_eq&amp;lt;/math&amp;gt; occurs at the bottom of the well, so force is at a minimum.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;F = \frac{dU}{r} = 0 = 4\epsilon \left(\frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{12\sigma^{12}}{r_{eq}^{13}} = \frac{6\sigma^6}{r_{eq}^7}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq}^6 = 2\sigma^6 = 2 r_0^6&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2} = 1.122 r_0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{r_{eq}^{12}} - \frac{r_0^6}{r_{eq}^6}\right) &amp;lt;/math&amp;gt; and from just above &amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{2^6r_{0}^{12}} - \frac{r_0^6}{2r_0^6}\right) = 4\epsilon\left(\frac{1}{2^6} - \frac{1}{2}\right) = 1.936\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{n}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Specifying variables rather than numerical values useful is because you may need to use that value at various points throughout the script. Using numerical values all over the script would become particularly annoying if you were running lots of simulations with the same variable multiple times as you would have to look through the whole script to find each value but with the dollar command you can just change it once. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
The script used to calculate the heat capacities is below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Heatcap2.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
[[File:MSDgas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 4.17 \times 10^{-4} m^2 timestep{^-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MSDliq.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:MSDsolid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 1.33 \times 10^{-6} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Millison msd gas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0305 = 0.00508 m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd liquid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd solid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 6 \times 10^{-8} = 1 \times 10^{-8} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Eroroor.PNG&amp;diff=518516</id>
		<title>File:Eroroor.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Eroroor.PNG&amp;diff=518516"/>
		<updated>2015-12-04T20:36:00Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Hadfdfhaha.PNG&amp;diff=518515</id>
		<title>File:Hadfdfhaha.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Hadfdfhaha.PNG&amp;diff=518515"/>
		<updated>2015-12-04T20:35:25Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Erororororor.PNG&amp;diff=518514</id>
		<title>File:Erororororor.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Erororororor.PNG&amp;diff=518514"/>
		<updated>2015-12-04T20:33:31Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Lelelelele.PNG&amp;diff=518509</id>
		<title>File:Lelelelele.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Lelelelele.PNG&amp;diff=518509"/>
		<updated>2015-12-04T20:26:11Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518499</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518499"/>
		<updated>2015-12-04T20:19:54Z</updated>

		<summary type="html">&lt;p&gt;Fp813: /* Equilibration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IEIEIEIEIIEIEIEIE.PNG]]&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
*At this seperation, the force is &amp;lt;math&amp;gt; \frac{-24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{dU}{r} = 4\epsilon \left(\frac{-12\sigma^{12}}{r^{13}} + \frac{-6\sigma^6}{r^7}\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \sigma = r = r_0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = 24\epsilon \left(\frac{-2}{r_0} + \frac{1}{r_0}\right) = -\frac{24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The equilibrium seperation, &amp;lt;math&amp;gt;r = r_eq&amp;lt;/math&amp;gt; occurs at the bottom of the well, so force is at a minimum.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;F = \frac{dU}{r} = 0 = 4\epsilon \left(\frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{12\sigma^{12}}{r_{eq}^{13}} = \frac{6\sigma^6}{r_{eq}^7}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq}^6 = 2\sigma^6 = 2 r_0^6&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2} = 1.122 r_0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{r_{eq}^{12}} - \frac{r_0^6}{r_{eq}^6}\right) &amp;lt;/math&amp;gt; and from just above &amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{2^6r_{0}^{12}} - \frac{r_0^6}{2r_0^6}\right) = 4\epsilon\left(\frac{1}{2^6} - \frac{1}{2}\right) = 1.936\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{n}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Specifying variables rather than numerical values useful is because you may need to use that value at various points throughout the script. Using numerical values all over the script would become particularly annoying if you were running lots of simulations with the same variable multiple times as you would have to look through the whole script to find each value but with the dollar command you can just change it once. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
The script used to calculate the heat capacities is below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Heatcap2.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
[[File:MSDgas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 4.17 \times 10^{-4} m^2 timestep{^-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MSDliq.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:MSDsolid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 1.33 \times 10^{-6} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Millison msd gas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0305 = 0.00508 m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd liquid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd solid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 6 \times 10^{-8} = 1 \times 10^{-8} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518479</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518479"/>
		<updated>2015-12-04T19:58:21Z</updated>

		<summary type="html">&lt;p&gt;Fp813: /* Introduction to Molecular Dynamics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:IEIEIEIEIIEIEIEIE.PNG]]&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
*At this seperation, the force is &amp;lt;math&amp;gt; \frac{-24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{dU}{r} = 4\epsilon \left(\frac{-12\sigma^{12}}{r^{13}} + \frac{-6\sigma^6}{r^7}\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \sigma = r = r_0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = 24\epsilon \left(\frac{-2}{r_0} + \frac{1}{r_0}\right) = -\frac{24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The equilibrium seperation, &amp;lt;math&amp;gt;r = r_eq&amp;lt;/math&amp;gt; occurs at the bottom of the well, so force is at a minimum.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;F = \frac{dU}{r} = 0 = 4\epsilon \left(\frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{12\sigma^{12}}{r_{eq}^{13}} = \frac{6\sigma^6}{r_{eq}^7}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq}^6 = 2\sigma^6 = 2 r_0^6&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2} = 1.122 r_0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{r_{eq}^{12}} - \frac{r_0^6}{r_{eq}^6}\right) &amp;lt;/math&amp;gt; and from just above &amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{2^6r_{0}^{12}} - \frac{r_0^6}{2r_0^6}\right) = 4\epsilon\left(\frac{1}{2^6} - \frac{1}{2}\right) = 1.936\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{n}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
The script used to calculate the heat capacities is below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Heatcap2.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
[[File:MSDgas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 4.17 \times 10^{-4} m^2 timestep{^-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MSDliq.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:MSDsolid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 1.33 \times 10^{-6} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Millison msd gas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0305 = 0.00508 m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd liquid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd solid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 6 \times 10^{-8} = 1 \times 10^{-8} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:IEIEIEIEIIEIEIEIE.PNG&amp;diff=518433</id>
		<title>File:IEIEIEIEIIEIEIEIE.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:IEIEIEIEIIEIEIEIE.PNG&amp;diff=518433"/>
		<updated>2015-12-04T19:01:37Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518400</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518400"/>
		<updated>2015-12-04T18:34:54Z</updated>

		<summary type="html">&lt;p&gt;Fp813: /* Introduction to Molecular Dynamics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
*At this seperation, the force is &amp;lt;math&amp;gt; \frac{-24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = \frac{dU}{r} = 4\epsilon \left(\frac{-12\sigma^{12}}{r^{13}} + \frac{-6\sigma^6}{r^7}\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \sigma = r = r_0 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; F = 24\epsilon \left(\frac{-2}{r_0} + \frac{1}{r_0}\right) = -\frac{24\epsilon}{r_0}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The equilibrium seperation, &amp;lt;math&amp;gt;r = r_eq&amp;lt;/math&amp;gt; occurs at the bottom of the well, so force is at a minimum.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;F = \frac{dU}{r} = 0 = 4\epsilon \left(\frac{-12\sigma^{12}}{r_{eq}^{13}} + \frac{6\sigma^6}{r_{eq}^7}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{12\sigma^{12}}{r_{eq}^{13}} = \frac{6\sigma^6}{r_{eq}^7}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq}^6 = 2\sigma^6 = 2 r_0^6&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2} = 1.122 r_0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{r_{eq}^{12}} - \frac{r_0^6}{r_{eq}^6}\right) &amp;lt;/math&amp;gt; and from just above &amp;lt;math&amp;gt;r_{eq} = r_0\sqrt[6]{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;\phi\left(r_{eq}\right) = 4\epsilon\left(\frac{r_0^{12}}{2^6r_{0}^{12}} - \frac{r_0^6}{2r_0^6}\right) = 4\epsilon\left(\frac{1}{2^6} - \frac{1}{2}\right) = 1.936\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{n}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
The script used to calculate the heat capacities is below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Heatcap2.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
[[File:MSDgas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 4.17 \times 10^{-4} m^2 timestep{^-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MSDliq.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:MSDsolid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 1.33 \times 10^{-6} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Millison msd gas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0305 = 0.00508 m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd liquid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd solid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 6 \times 10^{-8} = 1 \times 10^{-8} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518320</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518320"/>
		<updated>2015-12-04T16:12:21Z</updated>

		<summary type="html">&lt;p&gt;Fp813: /* Dynamical properties and the diffusion coefficient */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
The script used to calculate the heat capacities is below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Heatcap2.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
[[File:MSDgas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 4.17 \times 10^{-4} m^2 timestep{^-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MSDliq.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:MSDsolid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 1.33 \times 10^{-6} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Millison msd gas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0305 = 0.00508 m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd liquid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd solid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 6 \times 10^{-8} = 1 \times 10^{-8} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;C\left(\tau\right) = \frac{\int_{-\infty}^{\infty} v\left(t\right)v\left(t + \tau\right)\mathrm{d}t}{\int_{-\infty}^{\infty} v^2\left(t\right)\mathrm{d}t}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518295</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518295"/>
		<updated>2015-12-04T15:48:17Z</updated>

		<summary type="html">&lt;p&gt;Fp813: /* Dynamical properties and the diffusion coefficient */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
The script used to calculate the heat capacities is below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Heatcap2.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
[[File:MSDgas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 4.17 \times 10^{-4} m^2 timestep{^-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MSDliq.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:MSDsolid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 1.33 \times 10^{-6} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Millison msd gas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0305 = 0.00508 m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd liquid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Million msd solid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 6 \times 10^{-8} = 1 \times 10^{-8} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Million_msd_liquid.PNG&amp;diff=518287</id>
		<title>File:Million msd liquid.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Million_msd_liquid.PNG&amp;diff=518287"/>
		<updated>2015-12-04T15:36:01Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Million_msd_solid.PNG&amp;diff=518285</id>
		<title>File:Million msd solid.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Million_msd_solid.PNG&amp;diff=518285"/>
		<updated>2015-12-04T15:35:40Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Millison_msd_gas.PNG&amp;diff=518283</id>
		<title>File:Millison msd gas.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Millison_msd_gas.PNG&amp;diff=518283"/>
		<updated>2015-12-04T15:34:54Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518262</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=518262"/>
		<updated>2015-12-04T15:17:40Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
The script used to calculate the heat capacities is below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Heatcap2.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Dynamical properties and the diffusion coefficient==&lt;br /&gt;
&lt;br /&gt;
[[File:MSDgas.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 4.17 \times 10^{-4} m^2 timestep{^-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MSDliq.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.001 = 1.66 \times 10^{-4} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:MSDsolid.PNG]]&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
D = \frac{1}{6} \times 0.0025 = 1.33 \times 10^{-6} m^2 timestep^{-1}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:MSDsolid.PNG&amp;diff=518180</id>
		<title>File:MSDsolid.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:MSDsolid.PNG&amp;diff=518180"/>
		<updated>2015-12-04T14:38:56Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:MSDliq.PNG&amp;diff=518178</id>
		<title>File:MSDliq.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:MSDliq.PNG&amp;diff=518178"/>
		<updated>2015-12-04T14:38:14Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:MSDgas.PNG&amp;diff=518175</id>
		<title>File:MSDgas.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:MSDgas.PNG&amp;diff=518175"/>
		<updated>2015-12-04T14:36:28Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Heatcap2.PNG&amp;diff=518124</id>
		<title>File:Heatcap2.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Heatcap2.PNG&amp;diff=518124"/>
		<updated>2015-12-04T14:10:22Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517997</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517997"/>
		<updated>2015-12-04T12:43:35Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
The script used to calculate the heat capacities is below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Heatcap.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Heatcap.PNG&amp;diff=517994</id>
		<title>File:Heatcap.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Heatcap.PNG&amp;diff=517994"/>
		<updated>2015-12-04T12:42:13Z</updated>

		<summary type="html">&lt;p&gt;Fp813: Fp813 uploaded a new version of File:Heatcap.PNG&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517993</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517993"/>
		<updated>2015-12-04T12:41:53Z</updated>

		<summary type="html">&lt;p&gt;Fp813: /* Calculating heat capacities using statistical physics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
The script used to calculate the heat capacities is below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517991</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517991"/>
		<updated>2015-12-04T12:40:35Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Calculating heat capacities using statistical physics==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517976</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517976"/>
		<updated>2015-12-04T12:32:01Z</updated>

		<summary type="html">&lt;p&gt;Fp813: /* Running simulations under specific conditions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case 1000 averages are taken in total, once every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517966</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517966"/>
		<updated>2015-12-04T12:27:14Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \gamma^2 \frac{1}{2}\sum_i m_i v_i^2\ = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; \gamma^2 \frac{1}{2}\sum_i m_i v_i^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Cancel &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2&amp;lt;/math&amp;gt; to give &amp;lt;math&amp;gt;\gamma^2 = \frac{\mathfrak{T}}{T}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
From the script&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;
From the LAMMPS manual&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; fix ID group-ID ave/time Nevery Nrepeat Nfreq value1 value2 ... keyword args ...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The numbers 100, 1000 and 100000 correspond to Nevery, Nrepeat and Nfreq respectively. These commands tell LAMMPS on which timesteps to calculate the averages of the properties that follow. Nrepeat tells LAMMPS how many averages to calculate, starting from the value given by Nfreq and working back in multiples of Nevery. In this case, an average is taken every 100 timesteps up to 100000 which is as far as the script will run.&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Structural properties and the radial distribution function==&lt;br /&gt;
&lt;br /&gt;
[[File:RDFs.PNG]]&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;br /&gt;
&lt;br /&gt;
From the log file, the lattice spacing of the solid is &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Lattice spacing in x,y,z = 1.45447 1.45447 1.45447&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:RDFs.PNG&amp;diff=517797</id>
		<title>File:RDFs.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:RDFs.PNG&amp;diff=517797"/>
		<updated>2015-12-04T11:23:43Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517791</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517791"/>
		<updated>2015-12-04T11:22:42Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Structural properties and the radial distribution function====&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;br /&gt;
&lt;br /&gt;
[[File:Integrations.PNG]]&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Integrations.PNG&amp;diff=517786</id>
		<title>File:Integrations.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Integrations.PNG&amp;diff=517786"/>
		<updated>2015-12-04T11:22:08Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517784</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517784"/>
		<updated>2015-12-04T11:21:42Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Structural properties and the radial distribution function====&lt;br /&gt;
&lt;br /&gt;
The solid is face-centred cubic and so when a reference atom is defined, there are 3 different distances that the other atoms in the unit cell can be away from each other. If the reference atom is in the middle of the top face of the cube, out of the first three peaks, the smallest (and second) peak will be from the atom in the middle of the opposite face of the cell because there are 4 atoms that fit this description, also the RDF has also been normalised and this is a relationship between two of the same lattice points and so it makes sense that the density at this point would be 1. The first peak will be the atoms on the corners of the same face as the reference atom and the atoms that are in the middle of the cell’s remaining faces as they are all the same distance from the reference atom; this is because the distance as you go to an edge and go down is the same as if you go to the edge and go across since the cell is a cube, also there are 12 such atoms and this is the tallest peak. The third peak arises from the atoms that are on the corners of the opposite face of which there are 8. The numbers quoted all arise from considering the actual lattice rather than the cell and also compare well with the relative heights of the peaks. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The RDF for liquids and gases look quite similar to each other but different to that of the solid as they are much less ordered. In both cases, the first peak is quite large before the curve quickly levels out at 1. The RDF measures the amount of atoms in a shell of radius, r, around the reference atom and so when the shell is small the concentration of nearby atoms is high and they resemble clusters. However, as the shell gets bigger it starts to become more diffuse and eventually reaches a point where the concentration of atoms in the shell cannot be distinguished from the density of the system as a whole. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By eye, the liquid and gas RDFs would seem to suggest that the gas is ever so slightly denser than the liquid, however, the functions are normalised and the actual density of gases is much lower and so there are far fewer atoms than in the liquid, as can be seen in the plots of their integrations.&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517201</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517201"/>
		<updated>2015-12-03T16:06:05Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
### DEFINE SIMULATION BOX GEOMETRY ###&lt;br /&gt;
variable density equal  0.2&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;
variable atoms equal 15*15*15*${density}&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;
&lt;br /&gt;
variable timestep equal 0.001&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;
variable pdamp equal ${timestep}*1000&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;
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 press density&lt;br /&gt;
variable dens equal density&lt;br /&gt;
variable dens2 equal density*density&lt;br /&gt;
variable temp equal temp&lt;br /&gt;
variable temp2 equal temp*temp&lt;br /&gt;
variable press equal press&lt;br /&gt;
variable press2 equal press*press&lt;br /&gt;
variable etotal equal etotal&lt;br /&gt;
variable etotal2 equal etotal*etotal&lt;br /&gt;
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_etotal v_etotal2&lt;br /&gt;
run 100000&lt;br /&gt;
&lt;br /&gt;
variable avedens equal f_aves[1]&lt;br /&gt;
variable avetemp equal f_aves[2]&lt;br /&gt;
variable avepress equal f_aves[3]&lt;br /&gt;
variable aveetotal equal f_aves[7]&lt;br /&gt;
variable aveetotal2 equal f_aves[8]&lt;br /&gt;
variable errdens equal sqrt(f_aves[4]-f_aves[1]*f_aves[1])&lt;br /&gt;
variable errtemp equal sqrt(f_aves[5]-f_aves[2]*f_aves[2])&lt;br /&gt;
variable errpress equal sqrt(f_aves[6]-f_aves[3]*f_aves[3])&lt;br /&gt;
variable heatcap equal ${atoms}*${atoms}*((f_aves[8]-f_aves[7]*f_aves[7])/(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;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;
print &amp;quot;Pressure: ${avepress}&amp;quot;&lt;br /&gt;
print &amp;quot;Stderr: ${errpress}&amp;quot;&lt;br /&gt;
print &amp;quot;Heat capacity: ${heatcap}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517162</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=517162"/>
		<updated>2015-12-03T15:40:15Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law because the gas is not ideal as there are repulsive and attractive terms in the Lennard-Jones potential and ideal gases have no interaction between the particles. And as the pressure increases the gap between the simulated and calculated densities increases too because at higher pressures there are more interaction between the particles and so the ideal gas approximation gets worse.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Rdfs.PNG&amp;diff=517048</id>
		<title>File:Rdfs.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Rdfs.PNG&amp;diff=517048"/>
		<updated>2015-12-03T14:51:11Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=515441</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=515441"/>
		<updated>2015-11-30T21:15:22Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[File:GRAPHS NPT 1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The bottom two lines are the density as a function of temperature as calculated by LAMMPS whereas the top lines are calculated using the ideal gas law using the equation derived below where pressure was 2.4 and 2.8 and the temperature was the LAMMPS average. The simulated density is much lower than the one predicted by the gas law WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY WHY. And as the pressure increases the gap between the simulated and calculated densities increases too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;PV = Nk_BT&amp;lt;/math&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;math&amp;gt;P = \frac{N}{V}k_BT &amp;lt;/math&amp;gt;   and   &amp;lt;math&amp;gt;   \rho = \frac{N}{V}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt;P = \rho k_BT      &amp;lt;/math&amp;gt;     but on LAMMPS in lj style, &amp;lt;math&amp;gt; \epsilon, \sigma &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; k_B &amp;lt;/math&amp;gt; are all equal to 1&lt;br /&gt;
&lt;br /&gt;
so &amp;lt;math&amp;gt; \frac{P}{T} = \rho&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:GRAPHS_NPT_1.PNG&amp;diff=515429</id>
		<title>File:GRAPHS NPT 1.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:GRAPHS_NPT_1.PNG&amp;diff=515429"/>
		<updated>2015-11-30T20:46:07Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=514116</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=514116"/>
		<updated>2015-11-26T17:07:26Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;br /&gt;
&lt;br /&gt;
==Running simulations under specific conditions==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
10 phase points (two pressures and 5 temperatures) were selected, &amp;lt;math&amp;gt;T^* = 1.6,  1.8,  2.0,  2.2,  2.4 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; p^* = 2.4,  2.8&amp;lt;/math&amp;gt; and the timestep was 0.001&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i v_i^2 = \frac{3}{2} N k_B T&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{3}{2} N k_B \mathfrak{T}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\frac{\frac{1}{2}\sum_i m_i v_i^2}{T} = \frac{3}{2} N k_B &amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt;\frac{1}{2}\sum_i m_i \left(\gamma v_i\right)^2 = \frac{\frac{1}{2}\sum_i m_i v_i^2}{T} \mathfrak{T}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=513445</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=513445"/>
		<updated>2015-11-24T22:22:22Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;: if &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; In the same lattice if the command &amp;quot;create_atoms&amp;quot; was used, 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075, 0.015. The worst choice is the one with the highest timestop, 0.015 because ideally a balance between resolution and the amount of time the system can be monitored is preferred but all of the timestops show the eventual equilibrium and so there is little benefit to a large value as instead it does not show the fact that equilibrium had to be reached.&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=513436</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=513436"/>
		<updated>2015-11-24T22:10:17Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;: if &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; In the same lattice, if the command create_atoms was used 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
The system reaches equilibrium after a time of about 0.5&lt;br /&gt;
[[File:Total energy.PNG]]&lt;br /&gt;
&lt;br /&gt;
5 simulations were run with timestops of 0.001, 0.01, 0.0025, 0.0075&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:Total_energy.PNG&amp;diff=513408</id>
		<title>File:Total energy.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:Total_energy.PNG&amp;diff=513408"/>
		<updated>2015-11-24T21:24:16Z</updated>

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

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;: if &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; In the same lattice, if the command create_atoms was used 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:ALL3GRAPH1.PNG]]&lt;br /&gt;
&lt;br /&gt;
T&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=513394</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=513394"/>
		<updated>2015-11-24T20:48:55Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction to Molecular Dynamics==&lt;br /&gt;
&lt;br /&gt;
[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;: if &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;math&amp;gt;r^* = \frac{r}{\sigma}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; r^*\sigma = r = 0.34 \times 10^{-9} \times 3.2 = 1.08\times 10^{-9} \mathrm{m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If &amp;lt;math&amp;gt;\frac{\epsilon}{k_B} = 120\mathrm{K}&amp;lt;/math&amp;gt; then since &amp;lt;math&amp;gt;k_B = 1.38 \times 10^{-23}&amp;lt;/math&amp;gt; the well depth in &amp;lt;math&amp;gt;\mathrm{kJmol^{-1}}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\epsilon = 120 \times 1.38 \times 10^{-23} \times 1000 = 1.66 \times 10^{-18} \mathrm{kJmol^{-1}}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
* temperature &amp;lt;math&amp;gt;T^* = \frac{k_BT}{\epsilon}&amp;lt;/math&amp;gt; therefore &amp;lt;math&amp;gt; T = \frac{T^{*}\epsilon}{k_B} = 1.5 \times 120 = 180 \mathrm{K} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Equilibration==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 1&#039;&#039;&#039; Giving atoms random starting positions in simulations can cause problems because if there are two atoms that are placed too close together (ie if they are within &amp;lt;math&amp;gt; r_0 &amp;lt;/math&amp;gt; of each other) then their potential energies - and thus initial accelerations and velocities -will be extremely high and they will move through the sample with an unrealistically high speed and this will also disrupt other atoms.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 2&#039;&#039;&#039; If each the spacing lattice point is 1.07722 and the lattice is three dimensional then the number density of lattice point is given by &amp;lt;math&amp;gt; \frac{1}{spacing} = \frac{1}{1.07722^3} = 0.8 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a face-centred cubic lattice has a number density of 1.2 then because it has four atoms per cell its volume can be given by &amp;lt;math&amp;gt; V = \frac{number}{density} = \frac{4}{1.2} &amp;lt;/math&amp;gt; and so the side length is just the cube root of this and so &amp;lt;math&amp;gt; l = \sqrt[3]{\frac{4}{1.2}} = 1.49 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 3&#039;&#039;&#039; In the same lattice, if the command create_atoms was used 4000 atoms would be created as there are 4 atoms per unit cell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039; &amp;lt;pre&amp;gt;&lt;br /&gt;
mass 1 1.0&lt;br /&gt;
pair_style lj/cut 3.0&lt;br /&gt;
pair_coeff * * 1.0 1.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first command sets the relative mass of Atom 1 as 1.&lt;br /&gt;
&lt;br /&gt;
In the second command &amp;quot;pair_style&amp;quot; is used to describe interactions between two particles and the &amp;quot;lj/cut&amp;quot; part tells LAMMPS that this interaction follows the Lennard-Jones potential and nothing more and that it cuts of when &amp;lt;math&amp;gt; r = 3 &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;pair_coeff&amp;quot; tells LAMMPS what coefficients to use in the style defined above. In this case it is the Lennard-Jones potential, and so it is telling LAMMPS to set &amp;lt;math&amp;gt; \epsilon &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; as 1.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5&#039;&#039;&#039; Specifying velocity and position as starting conditions means the Velocity Verlet Algorithm should be used.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=File:ALL3GRAPH1.PNG&amp;diff=513393</id>
		<title>File:ALL3GRAPH1.PNG</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=File:ALL3GRAPH1.PNG&amp;diff=513393"/>
		<updated>2015-11-24T20:48:03Z</updated>

		<summary type="html">&lt;p&gt;Fp813: Thermodynamic properties&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Thermodynamic properties&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=513313</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=513313"/>
		<updated>2015-11-24T16:57:53Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;: if &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt; ie &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt; is the distance when the potential is zero  &lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. Therefore &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
	<entry>
		<id>https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=513123</id>
		<title>Rep:Mod:fpp1994</title>
		<link rel="alternate" type="text/html" href="https://chemwiki.ch.ic.ac.uk/index.php?title=Rep:Mod:fpp1994&amp;diff=513123"/>
		<updated>2015-11-23T19:04:20Z</updated>

		<summary type="html">&lt;p&gt;Fp813: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:FrankTASK1.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:FppTASK2.xls]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX[[File:FppTASK3.xls]]  Here, it can be seen that when the timestep is 0.2 the total energy fluctuates by 1%. YOU NEED TO WRITE SOMETHING HERE.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 4&#039;&#039;&#039;: if &amp;lt;math&amp;gt;\phi\left(r\right) = 0 = 4\epsilon \left( \frac{\sigma^{12}}{r^{12}} - \frac{\sigma^6}{r^6} \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt; \frac{\sigma^{12}}{r^{12}} = \frac{\sigma^6}{r^{6}} &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sigma^{6} = r^{6}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Thus &amp;lt;math&amp;gt; \sigma = r_0&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
MORE TO DO HERE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\int_{2\sigma}^\infty \phi\left(r\right)\mathrm{d}r = 4\epsilon \left[- \frac{\sigma^{12}}{11r^{11}} + \frac{\sigma^6}{5r^5} \right]_{2\sigma}^\infty&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expansion of the above bracket is &amp;lt;math&amp;gt; 4\epsilon \left( \left( - \frac{\sigma^{12}}{11 \left( \infty \right)^{11}} + \frac{\sigma^6}{5 \left( \infty \right)^{5}} \right) - \left( - \frac{\sigma^{12}}{11 \left( 2\sigma \right)^{11}} + \frac{\sigma^6}{5 \left( 2\sigma \right)^{5}} \right) \right) &amp;lt;/math&amp;gt; but since &amp;lt;math&amp;gt; \frac{1}{\infty^{5}} = 0 &amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt; \epsilon = \sigma = 1 &amp;lt;/math&amp;gt; this becomes &amp;lt;math&amp;gt; 4 \left( \frac{1}{11 \left( 2 \right)^{11}} - \frac{1}{5 \left( 2 \right)^{5}} \right) = -0.0248 &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the same expansion, but &amp;lt;math&amp;gt;2.5\sigma&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;3\sigma&amp;lt;/math&amp;gt; as the lower limits gives &amp;lt;math&amp;gt;-0.00818&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;-0.00329&amp;lt;/math&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 5:&#039;&#039;&#039; The density of water is &amp;lt;math&amp;gt;1000 \mathrm{ kg\ m}^{-3}&amp;lt;/math&amp;gt; and so &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; would weigh &amp;lt;math&amp;gt;1 \mathrm{g}&amp;lt;/math&amp;gt;. The molecular mass of water is &amp;lt;math&amp;gt; 18.0 \mathrm{g mol}^{-1}&amp;lt;/math&amp;gt; and so the amount of molecules in &amp;lt;math&amp;gt;1 \mathrm{mL}&amp;lt;/math&amp;gt; of water is &amp;lt;math&amp;gt;1/18 \times N_{A} = 3.35 \times 10^{22}&amp;lt;/math&amp;gt;. And &amp;lt;math&amp;gt;10000&amp;lt;/math&amp;gt; molecules would occupy &amp;lt;math&amp;gt;\frac{10000}{3.35 \times 10^{22}} = 2.99 \times 10^{-18}\mathrm{mL} &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 6&#039;&#039;&#039;: Consider an atom at position &amp;lt;math&amp;gt;\left(0.5, 0.5, 0.5\right)&amp;lt;/math&amp;gt; in a cubic simulation box which runs from &amp;lt;math&amp;gt;\left(0, 0, 0\right)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\left(1, 1, 1\right)&amp;lt;/math&amp;gt;. In a single timestep, it moves along the vector &amp;lt;math&amp;gt;\left(0.7, 0.6, 0.2\right)&amp;lt;/math&amp;gt;. At what point does it end up, after the periodic boundary conditions have been applied?. It would be at &amp;lt;math&amp;gt;\left(0.2, 0.1, 0.7\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Task 7&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Fp813</name></author>
	</entry>
</feed>