Jump to content

Talk:Mod:AC2015LQ

From ChemWiki

JC: General comments: Good answers to most tasks, but a few tasks missing or not completed towards the end. Try to check through your work at the end to make sure that it is clear and complete.

Liquid Simulations

Background and Introduction to Molecular Dynamics

Molecular dynamics simulations are used in this report to calculate thermodynamic properties of various ensembles. The LAMMPS code was utilised to write these calculations, and they were subsequently performed on the University High Performance Computing (HPC) facilities. There is much history of using large HPC systems (e.g. ARCHER) to measure properties of large data sets, but many approximations must be made.

Here it is assumed that atoms behave as classical particles governed by Newton's Second Law, i.e. F=ma

This can be adapted to allow a simulation of atomic movement over time - the essence of molecular dynamics simulations. Of course if we were to simulate every individual atom there would be a huge expense in terms of computer processing energy and thus the velocity Verlet algorithm is implemented to give a good approximation to the overall system.

Initial simulations were run to find the timestep to be used in subsequent calculations.

The file HO.xls provided data for the position x, velocity v and force f of a system across a range of time. This may be used to model the behaviour of a classical harmonic oscillator using the velocity-Verlet algorithm mentioned previously. The behaviour was also modelled using the classical method and good agreement between the models visible in Figure 1

Figure 1
Figure 1

Energies

The energy of the system was calculated from a summation of the potential and kinetic energies:

E=Ekinetic+Epotential=K+U=12mv2+12kx2

where m is mass (given as 1.00), v is velocity and k is the force constant (given as 1.00)

Energy must be conserved for the simulation to provide a physically valid model (as per Newton's Third Law). However there is an inherent error in molecular dynamics calculations (due to the approximations that must be made link to later approxs). Hence the energy calculated with MD simulations drifts in accordance with Brownian motion [1].

JC: Checking conservation of energy is a way to check the validity of a simulation.

The velocity-Verlet simulation used does not conserve energy but instead keeps it fluctuating about a constant value over long periods of time. Hence the optimal timestep will give a minuscule variation in energy, but at the largest possible timestep to save computational cost. [2]

Timesteps were varied from 0.1 upwards, with the energies and the fluctuations listed in Table 1. The Energy versus Time Graph for a timestep of 0.1 is visible in Figure 2 below,

Figure 2

It was deduced that the simulations were valid for a timestep 0.2.

This is because the average total energy of the oscillator for the velocity-Verlet solution is constant for each timestep at Eaverage=0.5

Hence to keep the energy within 1% required a fluctuation of less than or equal to 1% of 0.5:

ΔE0.5×103

Thus the maximum timestep to give an energy fluctuation of less than 1% was determined to be 0.2. (Timestep 0.21 gives a fluctuation greater than 0.5 (1%), with 0.205 also above 1%)

JC: Good thorough analysis of different timesteps and choice of 0.2.

Errors

It was also possible to calculate the error between the classical solution for the position at time t and the position calculated using the velocity-Verlet algorithm, mentioned previously.

The classical solution was calculated using: x(t)=Acos(ωt+ϕ)

with A=1.00, ω=1.00, and ϕ=0

The variation in absolute error between the two methods was calculated for the same timesteps as used to optimise the energy calculations. This error follows an envelope function, plotted linearly in Figures 3 and 4 for timesteps of 0.1 and 0.2.


Figures 3 and 4 - The Envelope Function showing the Error Maxima at timesteps 0.1 and 0.2 (L-R)
Figures 3 and 4 - The Envelope Function showing the Error Maxima at timesteps 0.1 and 0.2 (L-R)

The variation in x and ΔE (both range and absolute) with timestep is summarised in Table 1, along with the number of error peaks. There is seen to be increasing error with deviation away from a suitable timestep (of 0.2). This is rationalised in that more timesteps samples a longer period of time and hence there are more maxima on the error graphs.


Timestep x max x min E max E min ΔE Number of Error Peaks
0.1 1 -1 0.5 0.49875 0.00125 5
0.2 1 -1 0.5 0.49500 0.00500 9
0.21 1 -1 0.5 0.49449 0.00551 10
0.205 1 -1 0.5 0.49474 0.00525 9

Table 1

JC: Why does the error increase over time for any timestep?

Atomic Forces

The Lennard-Jones potential is used to model the interactions between pairs of atoms in our system. This simplifies the system to ignore Coulombic effects and simulates the potential energies of two uncharged molecules according to the curve shown in Figure 5, which has contributions from both positive attractions (due to the induced dipole moments of atoms moving in a liquid) and negative interactions (short-range repulsion between atoms).

Figure 5 - Potential Energy as a Function of r, Lennard Jones curve, Ref https://en.wikipedia.org/wiki/Melting-point_depression#/media/File:Lennard-Jones.jpg
Figure 5 - Potential Energy as a Function of r, Lennard Jones curve, Ref https://en.wikipedia.org/wiki/Melting-point_depression#/media/File:Lennard-Jones.jpg

This is illustrated in the formula

U(rN)=4ϵ(σ12rij12σ6rij6)


If the separation is small, the potential is dominated by the σ12rij12 term - i.e. strongly positive, with much short-range repulsion.

As r, the σ6rij6 term dominates, hence long range attraction occurs.


Find the equilibrium separation, req, and work out the well depth (ϕ(req)). Evaluate the integrals 2σϕ(r)dr, 2.5σϕ(r)dr, and 3σϕ(r)dr when σ=ϵ=1.0.

ANSWER:

  • r0 at which potential energy, U, equals 0:

It is clear that U will become zero when r0=σ since this causes the term σ12r12σ6r6 to equal 0.

As stated above, r12 is long range repulsion; r6 is long range attraction

  • hence if r0=σ the force at this separation is calculated using
F0=dϕ(r)dr0


F0=dU(rN)dri
  • and since
U(rN)=iNijN{4ϵ(σ12rij12σ6rij6)}

The force at U=0 is equal to:

F0=0iNijN{4ϵ(σ12rij12σ6rij6)}
=4ϵ12σ12r0136σ6r06

Giving

F0=24ϵσ


the separation at equilibrium req has a force equal to zero:


Feq=dϕ(r)dreq=0

thus

12σ12req136σ6req7


2σ6=req6


req=σ216

and

ϕ(r)=4ϵ(σ1222σ12σ62σ6)

=4ϵ(1412)

Hence

ϕ(r)=ϵ

The integrals given may then be evaluated by setting σ=ϵ=1.0:

  • 2σϕ(r)dr=0.025
  • 2.5σϕ(r)dr=0.008
  • 3σϕ(r)dr=0.003

JC: All maths correct and nicely presented.

Periodic Boundary Conditions

Using the velocity-Verlet algorithm all we must define is the initial starting positions and velocities.

These simulations are performed for N between 1000 and 10000 since it is too expensive to simulate realistic volumes.

The number of water molecules in 1ml of water under standard conditions may be estimated as follows:

  • pressure=P=105Pa [3]
  • temperature=T=273.15K[3]
  • concentration=co=1moldm3[3]

1mlH2O=1dm3

JC: Careful with units and volumes, 1 ml = 1e-3 dm3 and in the next line your conversion from kg m-3 to g dm-3 is also out by 1e3, however, the errors cancel in the end so your answer is correct.

densityofH2O=ρ=999.8395kgm3=0.998395gdm3 under standard conditions

therefore mass of 1dm3=0.998395gdm3×1dm3=0.998395g

since mass(H2O)=18.015gmol1, number of molecules of H2O=0.998395g18.015gmol1×NA=3.35×1022mol

To estimate the volume of 10000 water molecules under standard conditions:

the volume of one molecule may be deduced from the first calculation above:

volume(onemolecule)=totalvolumenumberofmolecules

thus:

volume(onemolecule)=volume(3.35×1022mol)3.35×1022mol=1dm33.35×1022mol=2.99×1023dm3

and so the volume of 10000 molecules is simply:

10000×2.99×1023dm3=2.99×1019dm3

We utilise a periodic box (similar to a unit cell) to generate a system of large volume. If an atom leaves at one position, its replica will enter from the opposite direction.

Consider an atom at position (0.5,0.5,0.5) in a cubic simulation box which runs from (0,0,0) to (1,1,1). In a single timestep, it moves along the vector (0.7,0.6,0.2). It therefore ends up at the point (0.2,0.1,0.7)

JC: Correct.

Because..:

0.5+0.7=1.2 which becomes 0.2 in this system of volume (0,0,0) to (1,1,1)

0.5+0.1=0.6 o.k. / within cube boundaries

JC: Should this be 0.5 + 0.6?

0.5+0.2=0.7 fine also within the boundaries

Reduced Units

We simplify the calculations performed in the Lennard-Jones simulation by using reduced units, denoted by a star

e.g. distance r becomes r*.


The Lennard-Jones parameters for argon are σ=0.34nm,ϵ/kB=120K.

  • LJ cutoff:

r*=3.2=rσ

Therefore

r=r*σ=3.2×0.34nm=1.088nm ~ 1.09nm=1.09×109m

  • well depth:

ϵ=120kB=120K×1.3806×1023JK1=1.657×1021J

therefore per molecule the well depth is:

1.657×1021J/NA=1.66×1021J/6.0221×1023kJmol1=1.66×1024×6.0221×1023kJmol1=1.0kJmol1

  • the reduced temperature:

T*=kBTϵ=kBTkB×120K

When T*=1.5 ,this rearranges to:

T=1.5×kB×120KkB=1.5×120K=180K

JC: Good conversion of reduced units.

Equilibration

The Simulation Box

Using the velocity-Verlet algorithm required the initial starting conditions to be set. This is fairly straightforward for a crystal in which the lattice parameters are known, but for a liquid without fixed bonds it requires a different approach.

If the positions of atoms were simply picked at random, a physically impossible system may be generated, in which atoms co-exist in the same region of space. Clearly it is impossible for two (or more) atoms to overlap with one another - the fact they are physical objects makes this so.

JC: Why can atoms not overlap? Placing atoms at random can lead to configurations with very high repulsion between atoms which can make the system unstable.


This is illustrated by the Lennard-Jones curve where Epot as r0


The lattice spacing in the LAMPPS is output as

Lattice spacing in x,y,z = 1.07722 1.07722 1.07722

This gives a number density =0.8 shown by the following calculations:

(Knowing that for a cubic lattice we have one lattice point per unit cell)

numberdensity(ρ)=numberoflatticepointsvolumeof3Dlattice

lattice spacing d=1.07722

d3=1.077223=1.250009243

ρ=1/d3=0.7999990.8

A face-centred cubic lattice with a lattice point number density of 1.2 has a unit cell side length of 1.49

This is calculated as follows:

(41.2)13=3.333333313=1.493801582

The

create_atoms

command defines the number of atoms created for a lattice.

For a simple cubic cell there is 1 lattice point per unit cell, whilst a face centred cubic cell has 4 lattice points per unit cell.

Therefore 1000 unit cells will have 1000 atoms for a sc system but 4000 atoms for an fcc system.

JC: Correct answers clearly shown.

LAMMPS and syntax

The input script contains the following commands:

  • mass 1 1.0
  • pair_style lj/cut 3.0
  • pair_coeff * * 1.0 1.0
mass 1 1.0

This sets the mass of atom 1 (for a given atom of pure fluid) set to equal a value of 1.0

pair_style lj/cut 3.0

This sets the cutoff point (at which we no longer have atoms pairing with each other) to the Lennard-Jones (lj) potential, and since atoms are not bonded to each other in this system, this also defines which neighbouring atoms are & aren't interacting. Hence nearest neighbours and pairing potentials vary over time.

pair_coeff * * 1.0 1.0

This defines the pairwise force field coefficients; the leading asterisk and trailing asterisk combine to give all atom types from 1 to n and n to N which in this instance is simply 1 (as there is only 1 type of atom). Hence also the atom coefficients in a pair are both set to 1.0 since the atoms are of the same type and so have equal contributions to a pairwise force field. The final term sets the coefficients for all atom pairs to equal 1.

JC: What are the atom coefficients?

The simulation now has 1000 atoms, with the starting position t=0, masses and interatomic forces defined for each of them.

The final thing we need to define to completely specify the initial conditions is the velocity of each atom. The velocities of atoms in any system are defined by the Maxwell-Boltzmann distribution - this is easily achieved for

all

atoms at a reduced temperature of

1.5

using LAMPSS with the script

 velocity all create 1.5 12345 dist gaussian rot yes mom yes 


Given that we are specifying xi(0) and vi(0) , we use the velocity-Verlet algorithm in our simulations.

Specifying the timestep

The script includes the lines

 
### SPECIFY TIMESTEP ###
variable timestep equal 0.001 

It is written in this way since we want to use different values of timesteps (0.001, 0.0025, 0.0075, 0.01 and 0.015) to calculate the same measurements. If we simply used

timestep 0.001
 run 100000

it would not be possible to simply alter the code in future calculations with a different timestep (variable).

Moreover if we want to calculate the same overall time for different numbers of steps the floor function enables this.

JC: Defining a variable called timestep means that we can use the value of the variable in other commands and calculations throughout the script, so to change the timestep, only the value of the variable needs to be changed.


Some screengrabs showing VMD simulation progress for 2 molecules singled out of the system
Some screengrabs showing VMD simulation progress for 2 molecules singled out of the system

The spheres modeled in VMD may change position across the box very rapidly when it reaches one periodic boundary, and is reflected back across the other face

JC: Number the figure and then you can refer to it in the text.

Checking Equilibration

Simulations were visualised using VMD software to determine whether equilibrium was reached - and whether it was reached to a suitable degree of accuracy. This allows the determination of a suitable timestep for calculations that will be performed later on.

The simulation reached equilibrium for the four smallest timesteps, as visible by the plateaus in Figure 6. However the largest timestep of 0.015 failed to bring the system to equilibrium and therefore definitely should not be used.

Figure 6 - Energy versus Time for all the timesteps
Figure 6 - Energy versus Time for all the timesteps

Thus timesteps 0.001, 0.0025, 0.0075 and 0.01 give reasonable results as they all reach equilibrium. However it is clear that the measurements are less accurate above the timestep of 0.0025, since the energy oscillates at a higher energy. The timestep of 0.0075, has a 0.06% error in energy with respect to the energy calculated at a timestep of 0.001 (the smallest and therefore most accurate system), which increases to 0.1% for ts = 0.01. In terms of cost, 0.0025 requires 40000 steps whilst 0.0075 requires 1334 steps. There is not a huge computational cost to improving the accuracy - thus the timestep of 0.0025 (with % error for energy = 0.005) is the best compromise between accuracy and cost.

JC: Good choice of timestep.


To determine how long the system took to reach equilibrium, the plots of Energy versus Time for a timestep of 0.001 were zoomed in. It is apparent that equilibrium is reached at a time of roughly 0.5.

Figure 7 -Zooming into the graph to see at what point the system reaches equilibrium
Figure 7 -Zooming into the graph to see at what point the system reaches equilibrium

It is also apparent that equilibrium conditions were reached by inspection of the Pressure-Time and Temperature-Time plots, seen in the Figures 8 and 9. The results for the other timesteps were consistent with these, and validates the choice of 0.0025 for further calculations.

Figure 8 - Pressure versus Time for the 0.001 Timestep
Figure 9 - Temperature versus Time for the 0.001 Timestep

JC: Good analysis to see the simulation reaching equilibrium over time based on pressure and temperature.

Running Simulations under Specific Conditions

The simulations thus far were performed using the microcanonical (NVE) ensemble, and seen to give a constant average value for timesteps of less than 0.01.

However to investigate thermodynamic properties under specific conditions, the isobaric-isothermal ensemble (NpT) must be employed instead. This ensemble keeps the temperature and pressure constant, and again uses a defined timestep to model the simulation. The optimal timestep has already been chosen as 0.0025.

Ten simulations were run with the following parameters (Shown in Table 2) (in reduced units):

Pressure Temperature
2.5 1.55
2.5 1.65
2.5 1.75
2.5 1.85
2.5 1.95
2.7 1.55
2.7 1.65
2.7 1.75
2.7 1.85
2.7 1.95

Table 2

The pressures were chosen to be close to the average pressure of 2.62 from the equilibrium simulations. This should give a physically reasonable system. From these ten simulations, ten phase points are generated from which an Equation of State may be derived.


Thermostats and Barostats

The equipartition theorem states that, on average, every degree of freedom in a system at equilibrium will have 12kBT of energy. In our system with N atoms, each with 3 degrees of freedom, we can write

EK=32NkBT

12imivi2=32NkBT

At the end of every timestep, we use the left hand side of this equation to calculate the kinetic energy, then divide by 32NkB to get the instantaneous temperature T. In general, T will fluctuate, and will be different to our target temperature, 𝔗. We can change the temperature by multiplying every velocity by a constant factor, γ.

  • If T>𝔗, then the kinetic energy of the system is too high, and we need to reduce it. γ<1
  • If T<𝔗, then the kinetic energy of the system is too low, and we need to increase it. γ>1

We need to choose γ so that the temperature is correct T=𝔗 if we multiply every velocity γ. We can write two equations:

12imivi2=32NkBT

12imi(γvi)2=32NkB𝔗

These may be solved to determine γ:

Since T=𝔗, T𝔗=1

Thus

12imivi212imi(γvi)2=1

If we expand (γvi)2 to γ2vi2, the fraction becomes:

imivi2imi(γ2vi2)=1

hence

γ=(1)12

or substituting back in the relationship T𝔗=1

the factor is equal to:

γ=(T𝔗)12

JC: Correct final expression, but don't substitute T/(target T) = 1 in your derivation.

Examining the Input Script

The temperature and pressure are controlled by the line:

fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2

This translates to:

  • fix = operation
  • aves all = group of atoms this operation is being applied to (all atoms here)
  • ave/time = style name of this command
  • 100 = use input values every this many timesteps (every 100 timesteps)
  • 1000 = number of times to use input values for calculating averages (1000 since 1000 atoms)
  • 100000 = calculate averages every this many timesteps (just once in this simulation then since overall sim is 100000 timesteps)

Hence the average is calculated for the whole system, with the parameters being sampled every 100 timesteps (which equals 100000/100 = 1000 times) and (100000/1000=)100 measurements contributing to the average. The amount of time simulated is (100000*0.0025 =) 250 (in reduced units).

Plotting the Equations of State

Figure 10 - Density versus Temperature at both pressures
Figure 10 - Density versus Temperature at both pressures

JC: There seems to be very little difference between the simulated results in the two graphs above.

The density (NV) at each pressure was plotted as a function of temperature, and is visible via a blue line in Figure 10. The error bars shown correspond to the standard error associated with each phase point, as detailed in the output log file. The vertical error bars are too small to be seen on the graphs since the error in density was in the order of 3×103


The density may be calculated from the ideal gas law using ρ=NV

PV=nRT=NkBT with the number of moles of gas n=NNA and the gas constant R=NAkB

hence

ρ=NV=PkBT

In reduced units, kB=0 and hence the density is easily calculated from the pressure and temperatures as shown by the orange line in the Density-Temperature graphs in Figure 10.

JC: In reduced units kB=1.

The ideal gas law predicts a higher density than that simulated. This was anticipated because the ideal gas law holds assumptions that neglect atom size and interatomic attractions, thus placing atoms at distances further apart than they are in reality.

However, at higher pressure, the average distance between atoms is less significant with respect to molecular size and so the neglection of atom size becomes less important, and the ideal gas model becomes more accurate. Similarly, at higher temperatures the neglection of interatomic attractions is less important (since they are reduced) and again, the two models are closer in value.

JC: Do you expect the ideal gas to be a good approximation for gases at high or low pressures?

As the temperature increases, the atoms gain more energy and thus are separated by a greater distance (increased repulsion) and thus the ideal gas model neglection of this distance becomes less important.

Hence the discrepancies between the ideal gas density and the simulated density decrease with both temperature and pressure. Mathematically, the average difference at P=2.5 is 0.746, which reduces to 0.186 at P=2.7.

Assumptions

  • (1) N is very large (there is a large number of atoms), which obey Newton's laws of motion
  • (2) the atomic volume is far smaller than the volume of the gas (negligible)
  • (3) there are no forces (electrostatic or otherwise) acting on the atoms except extremely brief collisions (which are ignored)

Part 5 Heat Capacities of the System

The heat capacity CV of a system is defined by:

CV=δQδT

For our system, the temperature is being held constant and thus we use fluctuations in the total energy to determine the capacity instead. The eqaution for this is:

CV=ET=Var[E]kBT2=N2E2E2kBT2

Var[E] is the variance in E, N is the number of atoms, and it is a standard result from statistics that Var[X]=X2X2.

We use N2 since we have calculated the energies in LAMMPS using the input script

 pair_style lj 

which normalises the energy by the number of atoms (i.e. the output E is EN


A script was written based on the file npt.in provided for the isobaric-isothermal ensemble. The differences made were:

  • to allow the density of the system to be varied according to the
 sc 

lattice command syntax

  • to change the NpT ensemble to NvT
  • turn off the thermostat once the system has reached equilibrium (the crystal has melted)
  • add variables to allow the calculation of the heat capacity, according to the equation above
  • print the average temperature and heat capacity

plot CV/V

V=[latticeparameter]3=1.077223=1.25001

The plots are shown below

Figure 11
Figure 11

JC: Can you comment on this graph, what is the trend in heat capacity with temperature or density?

An example of the script used for p=0.2,t=2.0is:

### DEFINE SIMULATION BOX GEOMETRY ###
lattice sc 0.2
region box block 0 15 0 15 0 15
create_box 1 box
create_atoms 1 box

### DEFINE PHYSICAL PROPERTIES OF ATOMS ###
mass 1 1.0
pair_style lj/cut/opt 3.0
pair_coeff 1 1 1.0 1.0
neighbor 2.0 bin

### SPECIFY THE REQUIRED THERMODYNAMIC STATE ###
variable T equal 2.0 
variable p equal 2.5 
variable timestep equal 0.0025

### ASSIGN ATOMIC VELOCITIES ###
velocity all create ${T} 12345 dist gaussian rot yes mom yes

### SPECIFY ENSEMBLE ###
timestep ${timestep}
fix nve all nve

### THERMODYNAMIC OUTPUT CONTROL ###
thermo_style custom time etotal temp press
thermo 10

### RECORD TRAJECTORY ###
dump traj all custom 1000 output-1 id x y z

### SPECIFY TIMESTEP ###

### RUN SIMULATION TO MELT CRYSTAL ###
run 10000
unfix nve
reset_timestep 0

### BRING SYSTEM TO REQUIRED STATE ###
variable tdamp equal ${timestep}*100
variable pdamp equal ${timestep}*1000
fix nvt all nvt temp ${T} ${T} ${tdamp} 
run 10000
reset_timestep 0

unfix nvt 
fix nve all nve

### MEASURE SYSTEM STATE ###
thermo_style custom step etotal temp press density atoms
variable dens equal density
variable dens2 equal density*density
variable temp equal temp
variable temp2 equal temp*temp
variable press equal press
variable press2 equal press*press
variable esquared equal etotal*etotal
variable e equal etotal
fix aves all ave/time 100 1000 100000 v_dens v_temp v_press v_dens2 v_temp2 v_press2 v_esquared v_e 
run 100000

variable avedens equal f_aves[1]
variable avetemp equal f_aves[2]
variable avepress equal f_aves[3]
variable heatcp equal atoms*atoms*(f_aves[7]-f_aves[8]*f_aves[8])/f_aves[2]*f_aves[2]


print "Averages"
print "--------"
print "Density: ${avedens}"

print "Temperature: ${avetemp}"

print "Pressure: ${avepress}"
print "Heat Capacity: ${heatcp}"

Structural Properties and the radial distribution function (RDS)

The radial distribution function generates a plot of the number of nearest neighbours at increasing interatomic distance r. This can be used to infer structural properties of the systems.

RDFs were generated for a vapour, liquid and solid defined by the following parameters (ascertained from analysing a Lennard-Jones phase diagram[4]

Vapour:

Reduced density = 0.05

Reduced temperature = 0.75

Liquid:

Reduced density = 0.8

Reduced temperature = 1.2

Solid:

Reduced density = 1.2

Reduced temperature = 1.2


reference for this part: Jean-Pierre Hansen and Loup Verlet, Phase Transitions of the Lennard-Jones System, Phys. Rev. 184, 151 – Published 5 August 1969 P. Ossi, Disordered Materials: An Introduction, Springer, Milan, 2003 Figure 12 - All Calculated RDFs - g(r) vs. r

Unsurprisingly, the RDF is 0 for r0.9. The Lennard-Jones repulsion term prevents the coexistense of atoms in this region below atomic diameter since such an overlap is physically impossible without great perturbation of the atomic structures (see Atomic Forces).

For the vapour phase, there is only one clear peak, with a possible secondary peak on its shoulder. This contrasts with the increasing number of peaks in the liquid and solid phases, as the system becomes more ordered and each particle experiences interactions with more neighbours at closer distances.

The liquid has a fairly smooth transition from

  • peak one at (r1): a situation analagous to a solvation shell, with the First Nearest Neighbours included; g(r)3.5
  • peak two at (r2): there are fewer Second Nearest Neighbours than First, in a similar way to how a primary solvation shell solvates tightly around a central ion, thus limiting the size of the outer hydration shell. Also for this peak, g(r)1.25, implying that molecules are half as likely to be found at this separation than at the separation defined by the first peak (since the g(r) is half the size)
  • peak three at (r3): the next nearest neighbours are suficiently far away to be tending towards bulk solution, with minimal attractive interaction

The first, second and subsequent troughs are the repulsions experienced between the central atom and opposing atoms and minimalise as the distance increases.

Figure 13

JC: If you zoom in on the integral of the solid RDF at small r you can see the jumps which correspond to the first 3 peaks and show directly the number of nearest neighbours responsible for each of the peaks.

Figure 14

The first three peaks of the RDF of the solid are seen to be more defined than for the liquid and vapour phases in which the atoms are not fixed in place and are more free to move. The atoms in a solid are fixed in position at given lattice points - and thus experience consistent interactions with neighbouring atoms.

Additionally, the amplitude of the peaks endure at higher levels and higher r values in the RDF for the solid phase, implying that long range order permeates to longer distances in a solid than in the other phases. This is reasonable when the structure of a solid is considered relative to the disorder of gases and liquids.

Moreover, the lattice spacing may be deduced from the RDF of the solid by correlating the peak to points on the lattice. The first peak corresponds to the nearest neighbours to a given atom (of which there are 12 for an fcc lattice). The second peak corresponds to the lattice spacing which is therefore equivalent to d1.49 for this solid. The third peak, with g(r3)12g(r1) (i.e. g(r) = 2.4 at r = 1.825, which is roughly half of g(r) (=4.6) at 1.025, corresponds to the third nearest neighbour shell. The coordination numbers are 12 for the first shell, 6 for the second nearest shell and 24 for the third nearest shell.

JC: Good description of how the solid RDF relates to the structure of the solid phase, compared to the liquid and vapour RDFs.

Coordination number at distance rA=4πg(r)r2dr

Mean Squared Displacement and the Diffusion Coefficient

Mean squared displacement calculations model how variable the system is. Hence MSD for a solid < liq < vapour.

The values input for the calculations were as follows:

Vapour:

Reduced density = 0.05

Reduced Temperature = 0.75


Liquid:

Reduced density = 0.8

Reduced Temperature = 1.2


Solid:

Reduced density = 1.2

Reduced Temperature = 1.2


Figure 15 Figure 16 Figure 17 Figure 18 Figure 19 Figure 20


JC: It would have been good to have shown the linear fits to the MSDs on your plots.

Evaluation of the normalised velocity autocorrelation function for a 1D harmonic oscillator

The diffusion coefficient is calculated using the formula D=16r2(t)t

And thus is simply gradientoftheMSDcurves6 However, we must convert the value of the gradient from timesteps into time using the reduced units. Since the value of the timesteps was 0.002, the measured gradient is simply divided by 0.002 to give the diffusion coefficient in correct units.

Solid: Liquid: Gas:

State Data Gradient D
Solid Simulated 5 x 10-8 4.17 x 10-6
Solid Provided 5 x 10-8 4.17 x 10-6
Liquid Simulated 0.001 8.3 x 10-2
Liquid Provided 0.001 8.3 x 10-2
Gas Simulated 0.0167 1.39
Gas Provided 0.0305 2.54

As expected, the MSD is largest for a gas and smallest for a solid in which the system remains relatively static. Moreover, the MSD equilibrates for a solid since the atoms and sit on fixed lattice points.

The simulated and provided data give concordant results to equivalent or very similar values for each phase. Therefore using a million atoms is not justified in terms of cost for the calculations of MSD.

Evaluation of the normalised velocity autocorrelation function for a 1D harmonic oscillator:

C(τ)=v(t)v(t+τ)dtv2(t)dt

The position of a 1D harmonic oscillator as a function of time is given by

x(t)=Acos(ωt+ϕ)

Considering that the velocity is defined by

v(t)=dxdt

We can apply the chain rule to define v(t) :

set uto equal (ωt+ϕ)

dudt=ω

hence

ddtAcos(ωt+ϕ)=Acos(u)

=dduAcos(u)dudt

=Asin(u)ω

=Aωsin(ωt+ϕ)

=v

For the velocity at time t+τ relative to time t we adapt the equation for v:

v(t+τ)=dxd(t+τ)

=Aωsin(ω(t+τ)+ϕ)

=Aωsin(ωt+ωτ)+ϕ)

this may then be substituted into the autocorrelation function to give:

C(τ)=v(t)v(t+τ)dtv2(t)dt


=C(τ)=Aωsin(ωt+ϕ)Aωsin(ωt+ωτ)+ϕ)dtA2ω2sin2(ωt+ϕ)dt


=C(τ)=Aωsin(ωt+ϕ)Aωsin(ωt+ωτ)+ϕ)dtAωsin(ωt+ϕ)Aωsin(ωt+ϕ)dt

=C(τ)=sin(ωt+ϕ)sin(ωt+ωτ)+ϕ)dtsin(ωt+ϕ)sin(ωt+ϕ)dt

This may then be expanded using the trigonomic identity

sin(x+y)=sin(x)cos(y)+cos(x)sin(y)

to give:

C(τ)=sin(ωt+ϕ)[sin(ωτ)cos(ωt+ϕ)+cos(ωτ)sin(ωt+ϕ)dtsin2(ωt+ϕ)dt

=sin(ωt+ϕ)sin(ωτ)cos(ωt+ϕ)+sin2(ωt+ϕ)cos(ωτ)dtsin2(ωt+ϕ)dt


=sin(ωt+ϕ)sin(ωτ)cos(ωt+ϕ)+dtsin2(ωt+ϕ)dt+sin2(ωt+ϕ)cos(ωτ)dtsin2(ωt+ϕ)dt

=sin(ωτ)sin(ωt+ϕ)cos(ωt+ϕ)+dtsin2(ωt+ϕ)dt+cos(ωτ)sin2(ωt+ϕ)dtsin2(ωt+ϕ)dt

=sin(ωτ)sin(ωt+ϕ)cos(ωt+ϕ)+dtsin2(ωt+ϕ)dt+cos(ωτ)

Thence, the first term =sin(ωτ)sin(ωt+ϕ)cos(ωt+ϕ)+dtsin2(ωt+ϕ)dt

simplifies to zero using the identity

sin(x)cos(x)dt=0

Hence

C(τ)=cos(ωτ)

JC: Final answer is correct, but some of your derivation is not very clear.

Velocity Autocorrelation Function

Figures 21, 22 and 23

Above VACF versus time graphs plotted using the data provided

Figures 24,25 and 26

Above VACF versus time graphs plotted using own data, to a time of 500

The minima in the VACF plots are due to collisions occurring between atoms in the system. When two atoms collide, their directions are altered. However, the liquid (Figures 22 and 25) returns to a VACF=0 more rapidly than a solid (Figures 23 and 26) since there is less structure in a liquid compared to the denser, more rigid solid structure. Conversely, the harmonic oscillator is modeled as two atoms on a spring, hence the VASF simply oscillates periodically about VACF=0 .

JC: Did you manage to plot the running averages for the VACFs or calculate the diffusion coefficients?

  1. P. Ossi, Disordered Materials: An Introduction, Springer, Milan, 2003
  2. R. LeSar, Introduction to Computational Materials Science, CUP, Cambridge, 2013
  3. 3.0 3.1 3.2 A. D. McNaught and A. Wilkinson, IUPAC. Compendium of Chemical Terminology, 2nd ed. Blackwell Scientific Publications, Oxford, 1997
  4. J-P. Hansen and L. Verlet, Phase Transitions of the Lennard-Jones System, Phys. Rev. 184, 151, 1969