Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lammps_tutorial
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cchiang2
lammps_tutorial
Commits
5234edd2
Commit
5234edd2
authored
2 years ago
by
s1309877
Browse files
Options
Downloads
Patches
Plain Diff
Update README for tutorial 0
parent
eb7f1c44
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tut0_lj_fluid/README
+35
-24
35 additions, 24 deletions
tut0_lj_fluid/README
with
35 additions
and
24 deletions
tut0_lj_fluid/README
+
35
−
24
View file @
5234edd2
# 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-Anders
o
n (WCA)
gives a potential also known as the Weeks-Chandler-Anders
e
n (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
i
t reaches -epsilon)?
(i.e., that t
he 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
T
hi
s gener
ates two files that are ne
cessary
for running LAMMPS
w
hi
ch cre
ates two files that are ne
eded
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
. V
isit docs.lammps.org/Install.html for more info on how to
install LAMMPS.
own computer
(v
isit 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
change
s the overall dynamics of
strength between different types of atoms
affect
s 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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment