0% found this document useful (0 votes)
31 views

Assignment 1

This document provides instructions for performing a molecular dynamics simulation of a Lennard-Jones binary fluid using LAMMPS. Students are asked to simulate a mixture of 1500 large particles and 100 small particles, calculate various properties, and plot the total energy, mean squared displacements, diffusion coefficients, and radial distribution functions. They are then asked to repeat the simulation with different parameters and submit a report summarizing the objectives, snapshot, parameters, plots, and observations.

Uploaded by

Aayush Jalan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Assignment 1

This document provides instructions for performing a molecular dynamics simulation of a Lennard-Jones binary fluid using LAMMPS. Students are asked to simulate a mixture of 1500 large particles and 100 small particles, calculate various properties, and plot the total energy, mean squared displacements, diffusion coefficients, and radial distribution functions. They are then asked to repeat the simulation with different parameters and submit a report summarizing the objectives, snapshot, parameters, plots, and observations.

Uploaded by

Aayush Jalan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

CH504

8 March 2023

Tutorial 1

Lennard Jones Fluid


The objective of Tutorial 1 is to use LAMMPS to perform a simple molecular dynamics simulation
of a binary fluid. The system we use for this tutorial is called Lennard-Jones fluid. It’s a simple
model system that consists of a mixture of two types of particles. The simulation box is cubic with
periodic boundary conditions.

1. Login to your account as follows:


ssh [email protected]
username is ch504_folder_number
password is ch504_folder_number@md

Example: ssh [email protected]

Password for this will be ch504_280@md

2. Check the input script (lj_fluid.in) provided in folder Assignment-1. Go through the input
script carefully before proceeding. Set the following parameters before running the
simulations.
Box size = cubic with a = 40𝜎, interaction parameter ε = 1, size of particle A = 1 𝜎, size of
particle B = 2 𝜎, No. of particle A =1500, No. of particle B =100, timestep = 0.005.
3. Run the simulation for 106 steps for production run (see the script). To submit the
simulation:
lmp_serial < lj_fluids.in
4. Calculate the following quantities by using the compute command given in the input script.
5. Plot the different quantities calculated from the simulation using the output.
a. Plot the total energy, kinetic and potential energies of the system as function of
time (convert the steps to time by multiplying with the timestep, time =
timestep×steps).
b. Mean squared displacement and diffusion coefficient for Particle A
c. Mean squared displacement and diffusion coefficient for Particle B
d. Radial distribution function for Particle A
CH504
8 March 2023
e. Radial distribution function for Particle B
f. Load the trajectory file and generate a snapshot of the simulation using any one
of the packages used for visualization.

To use VMD for visualization purpose login to the server in the following
manner:

ssh -X [email protected]

vmd (use this command to open VMD)

For visualizing the system, load your trajectories there on VMD by using the steps give
below.

• vmd dump.lammpstrj
• Go to Extensions→TkConsole
• pbc box (to see the periodic boundary conditions)
• pbc wrap -all
• Graphics→Representations→ Drawn style CPK and Bond Size = 0
• Create two representations: type 1 (colorid = green) and type 2 (colorid = red)

Create two representations


(using Create Rep option) to
use different color for the
particles of different types

Use two different colors by


changing the color ID as
shown here. Use Bond
radius as Zero.

• Now, take the screenshot of the simulated system.


CH504
8 March 2023
6. Repeat the simulation by changing the interaction parameters (epsilon = 2) and size of the
particle (Type_1 = 2 𝜎 and Type_2 = 4 𝜎) and particle numbers (Type_1 = 1200 and
Type_2 = 1000). Keep rest of the parameters the same.
7. Write down the parameters used for the simulations such as box dimension, interaction
parameters, size of the particles, number of particles of different types in the system,
timestep used, and equilibration/production simulation length. Include these details along
with the plots in the submission file.

**Read about the different quantities computed and how you can use those functionalities
available in the package for upcoming assignments.

Guide for generating the plots:

MSD plots: Plot should in log-log scale and compute the Diffusivity using linear fitting of the
curve at the long-time.

Linear fitting of the MSD curve (plotted in log-log scale) for slope~1 will give you the intercept
of the curve. Using which we can compute Diffusivity as follows:

2n×D = antilog(Intercept), where n is the dimensionality (n =1, 2, 3)

Here, n = 3 then 6D = antilog(Intercept)

antilog(Intercept)
D=
6
CH504
8 March 2023

Assignment Submission File (General Format)

NOTE: The assignment you are going to submit should be for the data obtained from the
simulations with the parameters given in step-6.

1. Objective: State the problem what you are doing and mention the system you are
simulating in brief.
2. Snapshot of the system: Mention the color code of the particles and indicate the Periodic
boundary conditions (periodic box). Mention the box dimensions as well.

Snapshot of the system

3. List the Parameters used for the simulations (mentioned in the step-7). Also add the
screenshot of the interaction parameter portion here (pair_style and pair_coeff part in the
input script).
For example:
CH504
8 March 2023
4. Plot the quantities you have computed from the simulations (refer to step-5) and explain
the plots in brief with possible reason for the observed trend/behavior.
5. Plotting Energy:
Extract the data from the file Properties_Energy.dat. Use the following commands:
sed -i ‘10029,10055d’ Properties_Energy.dat
sed -i ‘1,27d’ Properties_Energy.dat
** after this multiply the first column with the timestep (to convert it to time) used
and plot the data for Kinetic energy, Potential energy, and total energy as a function of
time.

No. of Particle A = ?
No. of Particle A = ? No. of Particle A = ?
No. of Particle B = ?
No. of Particle B = ? No. of Particle B = ?
K.E

P.E

ETot
τ τ τ

Briefly mention what you observe and compute the average energies.

6. For plotting MSDs: Extract the data from the file using the following commands:
sed -i ‘10029,10055d’ MSD_TypeA.dat
sed -i ‘1,27d’ MSD_TypeA.dat
** after this multiply the first column with the timestep used and plot the data in
log-log scale and compute the diffusivity.

For example:

Sample plot: Mean Square Displacement (MSD)


CH504
8 March 2023

Particle A
Particle B

<δr2(τ)> τ

Briefly mention what you observe and the possible reasoning. Show the
calculation for computing Diffusivities using the method given above.

7. For plotting the RDF extract the last 200 lines (considering the last frames of simulations
only) from the file RDF_LJ_Fluids.dat and plot the 2nd and 3rd columns to get the correct
plot.
Example:

Particle A
Particle B
g(r)

Briefly mention what you observe and the possible reasoning


CH504
8 March 2023

Note: Plot the MSDs of particle A and B together in the same plot and use different colors for
them. Same applicable for other quantities calculated. Be consistent with the color code for all the
plots.

** Mention the legends and parameters used properly in the figure. Also describe what you
observe from those quantities and possible reason for the observation. Do the same for all the other
quantities you obtained and plotted. Also show the required calculations for computing
Diffusivities.

You might also like