Talk:Mod:AL3214
Molecular dynamics simulation
General comments: a good attempt but not quite finished with the VACF. Explanations a bit brief and quite a few grammar troubles. Ensure you go through the report before submission to check for grammar. Mark: 58/100
Tasks 1,2 and 3: Velocity-Verlet algorithm:
- The variation of the position of an atom was calculated using the classical harmonic oscillator approach and the Velocity-Verlet algorithm. Image 1 shows the difference between the two methods.
The orange line traces de maximum error peaks. It can be seen that these maximum errors increase linearly () with time. The reason behind this is that the simulation of each time-step requires that of the previous one, so the error builds up. Tick. Be careful to check your grammar.
For the following simulations, since the energy of an ensemble should be constant over time we needed to find the value of the time-step that would give the lowest standard deviation in order words, the least energy fluctuations. The following table shows that 0.03 gives a 1% STD. Tick although I don't think your table does explicitly show this
Time-step | Standard deviation |
---|---|
0.1 | 0.18 |
0.01 | 0.17 |
0.001 | 0.003 |
0.002 | 0.012 |
Task 4: Lennard Jones Potential:
- Finding at which the potential is zero:
- Since :
- And:
- Finally Tick
- Force at seperation at equal to
- Since at this point,
- or Tick.
- Finding the equilibrium separation:
- The equilibrium separation corresponds to the energy minimum of the Lennard Jones potential curve. As it is the minimum it will be a solution of equating the first derivative of to zero.
- Calculating and knowing it has to equal to zero.
- = =
- ' Tick.
- Now the well depth can be found
- = == Tick
- Evaluating integrals , , and . With values of
=
- The same process was followed for the other integrals:
- Tick. Good
Task 5: Number of water molecules in 1ml of water and volume of 1000 water molecules
- 1mL of water equals 1 gr of water. Dividing this gram by 18.01528 g/mol, the molar density of water we get 0.0555 mol of water. Finally by multiplying by Avogadro's number we find that there are molecules of water in 1 mL.
- Proportionally, 10000 molecules will occupy a volume of mL. Tick.
Task 6:
- An atom at position sits in a cubic simulation box of dimensions from to with periodic boundary conditions. If this atom moves along the vector it will end up at . Tick.
Task 7: Reduced Units
- The Lennard-Jones parameters for argon are . If the LJ cutoff is , what is it in real units? What is the well depth in ? What is the reduced temperature in real units?
' Tick. Units?
Tick.
Not quite - you used the Lennard-Jones parameter?
Task 8: Density and lattice spacing
- Using the formula for density:
- Tick.
- If we consider a fcc lattice, (4 atoms per unit cell), with density of 1.2 and using the formula above:
- Where x is the side length of a unit cell
- Tick.
Why do random coordinates cause problems in simulations? Two overlapping atoms results in large forces. Larger forces require smaller timesteps
Task 9 Number of atoms with an fcc lattice
With the established set-up, 1000 unit cells are created. If an fcc lattice had been chosen 1000 unit cells would have also been formed each containing 4 atoms which add up to a total of 4000 atoms. Tick.
Task 10: Input script commands.
- The commands are used to determine the properties of the atoms.
mass 1 1.0
Sets the mass for all atoms of type 1 to a value of 1.0. Tick. In what units? It is worth remembering that for this simulation only 1 atom type has been used.
pair_style lj/cut 3.0
Calculates the coulombic pairwise interaction of two neighbouring atoms as the distance increases between them until a maximum of 0.3 in the Lennard-Jones potential. Tick. Units?
pair_coeff * * 1.0 1.0
Specifies the pairwise force field coefficients between atoms pairs. The asterisks indicate that all atoms types from 1 to N will have a value of 1. More detail would be good here. The asterisks tell LAMPPS that this command applies to "all atoms and atom types". The two numbers represent sigma and epsilon
Task 11: Integration algorithm
By specifying and , we are using the Velocity-Verlet algorithm. Tick.
Task 12: Understanding the code
variable timestep equal 0.001 variable n_steps equal floor(100/${timestep}) variable n_steps equal floor(100/0.001) timestep ${timestep} timestep 0.001
The code above is used to constrain the number of steps depending on the time-step.
This is easily visualized by choosing two different time-steps:
- timestep equal 0.001 n_steps = 100000
- timestep equal 0.002 n_steps = 50000
- The two time-steps have different number of steps but the sum of the time-steps is constant and its 100.
- In other words, the number of 's in the Velocity Verlet algorithm is different but their sum is constant.
- This sum of the time-steps is not dependent on the actual duration of the simulation. Ok. However, this was more asking about the purpose of the timestep variable. Just like programming, variables allow you to change a value throughout your code simply
Task 13: Variation of Energy, Pressure and Temperature plots with the time-step.
Tick.
It can be seen from Image that for a 0.001 times-step the simulation reaches equilibrium at around 0.02. Although pressure and temperature fluctuate throughout the simulation the energy remains constant with a standard deviation of___ that was previously calculated.This result was therefore expected. Be careful to go through your report and check you've filled in all your blanks
If we know *typo compare the effect of the time-step on the energy the following conclusions can be drawn:
- The larger the time-step, the less accurate the Velocity-Verlet algorithm, choosign *typo a larger time-step causes the error to increase
- Both 0.001 and 0.0025 give accurate energy readings but choosing 0.0025 will allow the simulations to run for longer.
- Above 0.003 The standard deviation of the energy increases to
- 0.015 as a time step does not reach an energy stabilisation.
In view of the above, the simulations will be run for both 0.001 and 0.0025 as time-steps. Accuracy vs. computational efficiency. You want a small timestep but you want a timestep that requires less time to run
Task 14: Determining
To achieve every has to be multiplied by
Substituting :
Cancelling and rearranging leads us to:
- Tick
Task 15: Numbers 100 1000 100000
- First: Use the input values every this number of time steps.
- Second: number of times to repeat the input values for calculating the averages.
- Third: To calculate averages for this frequency of timesteps
Task 16: Editing the equations of state
Ensure that your graphs have an appropriate legend if you have more than one graph on the same plot
The graphs above show the change in density with respect to temperature. These simulations of ensembles were run at a time-step of 0.0025 that as shown in Task 1 ensures that the energy of the system does not fluctuate more than 1%. From these graphs several conclusions can be drawn:
- An increase in temperature causes a decrease in density.
- An increase in pressure causes an increase in density.
What about your calculated densities vs. the ideal gas? How does the discrepancy change with temperature?
Task 17: Heat Capacities
For this simulation a file was created File:Log file.rtf
From the plot above it can be seen that a temperature increase causes a decrease in heat capacity. <span style="color:red"Tick.
The reasoning behind this trend is that because the simulation establishes a certain lattice structure there is a constraint on the positions of the atoms. This constraint stops the atoms from gaining free energy. At constant volume the heat capacity can be written as [1] . Consequently if the increase in internal energy is not greater that the temperature increase the heat capacity will decrease. Nice idea but think about the density of states and how it changes with an increase in temperature
A change in density changes the volume of the lattice cells, as calculated in Task . Be careful to go through your report and check you've filled in all your blanks At higher densities the heat capacity of the system increases. This is due to the lattice cells being more effectively filled and hence more atoms per area can potentially increase their internal energy.
Task 18: Radial distribution functions
The radial distribution plots for solid, liquid and gas can be seen below.
For this simulation, a face centred cubic lattice was used and the values for the density and temperature were chosen according to the phase diagram of a Lennard-Jones system.[2]
All plots start at zero as the potential interaction, which an atom experiences from others at a position x=0 from itself, is zero.
As the distance from that atom is increased there is an increasing probability of encountering other atoms.
In a gas, due to the free motion of the atoms around the simulation box, the RDf RDF stands for radial distribution function function goes the fastest to zero. For the liquid as there is a reduce *Typo in motion and an increase of the atoms to be fixed to the lattice structure the first peak quickly flattens out. What about the peaks? Finally, for a solid, due to the fixed nature of the atoms to the lattice sites, the RDF peaks can be related to the distance to the nearest neighbours, which in this case are 1.025, 1.775 and 2.675 as shown on the plot below.
From the looks of your RDF, you simulated a liquid for your solid plot. Additionally, would be nice to discuss the long-range order in each and compare to their RDFs
Some more description here would be good. In the solid case, illustrate which lattice distances correspond to the first three peaks. What is the lattice spacing in the solid? What is the coordination number for each of the first three peaks in the solid?
Task 19: Mean Squared Displacement

The MSD was plotted as seen on the images on the right. Fronm those plots, the gradient was calculated and divided by 6 to give D, the diffusion coefficient. the results are summarized in the following table:
Solid | Liquid | Gas | |
---|---|---|---|
Millions | 8.33E-9 | 1.66E-4 | 0.005 |
fcc | 1.16E-9 | 0.0011 | 0.00303 |
sq lat | 3.3E-6 | 0.0011 | 0.00302 |
There are two trends than can be inferred from the MDS plots.
- The diffusion coefficient increases when going from a solid phase to a liquid or a gas.
- The greater the density of the lattice, fcc with 4 atoms per simulation box, the lower the diffusion coefficient.
Under the same density conditions of the ensemble, the intrinsic density of an square lattice with 1 atom per simulation box, causes it to have an MSD plot which resembles after a liquid more than after a solid. Typos. Tick
VACF?
References
[1]Peter Atkins, Julio de Paula, Atkins Physical Chemistry, Oxford 2008.
[2] Hansen, J.-P., & Verlet, L. (1969). Phase Transitions of the Lennard-Jones System. Phys. Rev., 184(1), 151–161. http://doi.org/10.1103/PhysRev.184.151