Assignment 1
Assignment 1
8 March 2023
Tutorial 1
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]
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)
**Read about the different quantities computed and how you can use those functionalities
available in the package for upcoming assignments.
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:
antilog(Intercept)
D=
6
CH504
8 March 2023
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.
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:
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)
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.