Skip to content
Snippets Groups Projects
Commit 5234edd2 authored by s1309877's avatar s1309877
Browse files

Update README for tutorial 0

parent eb7f1c44
No related branches found
No related tags found
No related merge requests found
# Tutorial 0 -- Lennard-Jones fluids
In this first tutorial, we use LAMMPS to perform molecular dynamics (MD)
simulations of a Lennard-Jones (LJ) fluid (colloidal particles in a sovlent).
The particles (atoms) are simulated in a periodic box, and they interact with
each other via the truncated LJ potential, which is given by
In the simulation we have two types of particles (atoms) situated in a
periodic box, and they interact with each other via a truncated and shifted LJ
potential, which is given by
U_LJ/cut(r) = U_LJ(r)-U_LJ(r_c), if r < r_c
......@@ -47,32 +50,34 @@ the online LAMMPS documentation:
docs.lammps.org/Manual.html
==============================================================================
###############################################################################
What to do:
0. Familarise yourself with the truncated LJ potential
0. Familarise yourself with the LJ potential
Using your favourite plotting package, plot the truncated LJ potential for
different parameter values (epsilon and r_c) and have a think about the
following questions:
Using your favourite plotting package, plot the truncated and shifted LJ
potential for different parameter values (epsilon and r_c) and have a think
about the following questions:
- At what critical value for r_c does the potential become purely
repulsive? Note that setting r_c to this value (with epsilon = 1.0)
gives a potential also known as the Weeks-Chandler-Anderson (WCA)
gives a potential also known as the Weeks-Chandler-Andersen (WCA)
potential. [Hint: have a look at the provided bash script init.sh if you
are unsure.]
- How does shifting the LJ potential change the value of its global
minimum? How does this depend on r_c? Is there a way we can ensure that
the minimum remains the same as that for the non-truncated LJ potential
(i.e., that it reaches -epsilon)?
(i.e., that the minimum reaches -epsilon)?
1. Run the simulation to get a feel of how to use LAMMPS
a. Generate the required input scripts/files
This is done by running the provided bash script
bash init.sh
This generates two files that are necessary for running LAMMPS
which creates two files that are needed for running LAMMPS:
- run.lam file - a 'driver' script that is read by LAMMPS
- init.in file - a trajectory file containing the initial configuration
of the system (i.e., the atoms' positions, bonds, etc)
......@@ -84,13 +89,19 @@ What to do:
You can use the pre-compiled version of LAMMPS available on the school
linux computers. Alternatively, you can also compile LAMMPS on your
own computer. Visit docs.lammps.org/Install.html for more info on how to
install LAMMPS.
own computer (visit docs.lammps.org/Install.html for more info on how to
install LAMMPS). To start the simulation, we use the command
lmp -in *.lam
lmp -in run.lam
pos*.lammpstrj files will be generated storing the atoms' positions
and velocities. See the 'dump' command in the *.lam script.
The simulation generates several files:
- pos*.lammpstrj - these files contain the trajectory of the atoms
(for equilibration and the main simulation)
- log.lammps - this contains similar info to what has been output
to the screen (e.g., thermodynamic info, computation
time, etc.)
See the comments next to the 'dump' command in the run.lam to understand
the file format for the trajectory files.
c. Visualise the atoms' trajectories
......@@ -123,7 +134,7 @@ What to do:
2. Play around with the simulation parameters
Explore how changing the number (density) of atoms and the interaction
strength between different types of atoms changes the overall dynamics of
strength between different types of atoms affects the overall dynamics of
the system. This can be done by editing the parameter values in the init.sh
script, in particular
......@@ -143,14 +154,14 @@ What to do:
Simulations are often conducted in 'reduced' units to maintain generality
of the results and to limit errors introduced from floating-point
arithmetic caused by doing computation on variables spanning many different
orders of magnitude. This is achieved by rescaling variables/observables by
a set of fundamental quantities characteristic to the system. In the case
of an LJ fluid, three key properties are the energy, length, and mass of
the system, and a natural choice is to rescale these by the thermal energy
(k_B*T), the size of a colloidal particle (sigma), and its mass (m). In
other words, we have k_B*T = 1.0, sigma = 1.0 and m = 1.0 in
reduced/simulation units (also known as LJ units for this particular
arithmetic caused by doing computation on variables with values spanning
many different orders of magnitude. This is achieved by rescaling variables/
observables by a set of fundamental quantities characteristic to the
system. In the case of an LJ fluid, three key properties are the energy,
length, and mass of the system, and a natural choice is to rescale these by
the thermal energy (k_B*T), the size of a colloidal particle (sigma), and
its mass (m). In other words, we have k_B*T = 1.0, sigma = 1.0 and m = 1.0
in reduced/simulation units (also known as LJ units for this particular
rescaling in LAMMPS).
- Based on these fundamental units, can you construct a natural time
scale to describe the system? [Hint: take a look at the 'units' command
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment