0% found this document useful (0 votes)
70 views2 pages

Problem Set 1

This document contains instructions for 3 problems related to molecular dynamics and Monte Carlo simulations. Problem 1 involves simulating the motion of a particle in a 1D harmonic potential well and analyzing its energy conservation and dynamics. Problem 2 derives thermodynamic expressions for this system and compares Monte Carlo simulations to the analytical results. Problem 3 modifies code to calculate energies and forces for particles interacting via Lennard-Jones potential in periodic systems.

Uploaded by

Uday Ramesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views2 pages

Problem Set 1

This document contains instructions for 3 problems related to molecular dynamics and Monte Carlo simulations. Problem 1 involves simulating the motion of a particle in a 1D harmonic potential well and analyzing its energy conservation and dynamics. Problem 2 derives thermodynamic expressions for this system and compares Monte Carlo simulations to the analytical results. Problem 3 modifies code to calculate energies and forces for particles interacting via Lennard-Jones potential in periodic systems.

Uploaded by

Uday Ramesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Problem Set 7

Due: 11/152021

Problem 1

Consider a particle trapped in a 1-dimensional harmonic well described by the potential energy
function
1
𝑈(𝑥) = 𝑘(𝑥 − 𝑎)!
2
where 𝑥 is the particle’s position, 𝑘 is the spring constant, and 𝑎 is the center of the well. The
Python code md_nve_harmonic_well.py is a molecular dynamic simulator that performs
Velocity-Verlet integration to track the motion of the particle as a function of time. The simulation
is performed in the NVE ensemble, with potential parameters 𝑘 = 1.0 and 𝑎 = 0. The particle has
a mass 𝑚 = 1, and its initial position and velocity are 𝑥(𝑡 = 0) = 0 and 𝑣(𝑡 = 0) = −1,
respectively.

(a) Write an expression for the force 𝑓(𝑥) acting on the particle as a function of the
particle’s position 𝑥
(b) Run the code to plot 𝑈(𝑥) and 𝑓(𝑥) on the same figure
(c) What is the initial total energy (potential + kinetic) of the particle at time 𝑡 = 0?
(d) Run a MD simulation for 1000 integration steps (𝑛"#$%" = 1000) using an integration
time step of 0.02 (𝑑𝑡 = 0.02). Plot the total energy as a function of time. How
accurately is the total energy conserved (report the approximate maximum change in
total energy divided by the average total energy)? What is typically the minimum
desired level of accuracy in terms of total energy conservation for molecular dynamics
simulations?
(e) Now run the same simulation using an integration time step of 𝑑𝑡 = 0.2. How does this
affect energy conservation? Is this time step choice appropriate? Explain.
(f) Plot the particle’s position as a function of time. How would you describe the particle’s
motion?

Problem 2

Consider the same system modeled in Problem 1.

(a) Derive an exact expression for the probability density distribution 𝑝(𝑥) associated the
particle at position 𝑥 at temperature 𝑇.
(b) We can define a free energy density 𝐹(𝑥)/𝑘𝑇 = −𝑙𝑛[𝑝(𝑥)] + 𝐶 , which is related to the
reversible work required to move the particle from 𝑥 to 𝑥 + 𝑑𝑥. The constant 𝐶 does
not influience the equilibrium behavior, which only depends on derivatives of 𝐹(𝑥).
Derive an expressions for 𝐹(𝑥) and 𝐶.
(c) How does 𝐹(𝑥)/𝑘𝑇 relate to 𝑈(𝑥) when we set the reduced temperature 𝑘𝑇 = 1?
(d) The Python code mc_nvt_harmonic_well.py implements Metropolis Monte Carlo (MC)
in the NVT ensemble for this system. Run a simulation at temperature 𝑘𝑇 = 1 for
𝑛"#$%" = 100000 MC steps using a maximum particle displacement of 𝑑𝑥&'( = 0.5.
Note that the code contains functions to compute 𝐹 ")& (𝑥)/𝑘𝑇 from the histogram of
particle positions (i.e., 𝑝(𝑥)) accumulated during the simulation. The computed
𝐹 ")& (𝑥)/𝑘𝑇is shifted by an arbitrary constant to ensure that it’s minimum value is 0.

Plot 𝑈(𝑥) , 𝐹 ")& (𝑥)/𝑘𝑇, and your analytical expression for 𝐹(𝑥)/𝑘𝑇 on the same graph.
How do the three functions compare? Where are the deviations the largest? Explain why
deviations might occur in these regions.

(e) Rerun the MC simulation at 𝑘𝑇 = 5 and repeat the analysis in part (d).

Problem 3

One of the key elements to a molecular dynamics or Monte Carlo code is the routine that calculates
the energy and net forces acting on the particles. Consider system of 𝑁 = 1300 particles in a
cubic simulation cell with periodic boundary conditions in all three dimensions. The particles
interact through a Lennard-Jones potential
+! ,
𝜎 𝜎
𝑢A𝑟)* C = 4𝜀 FG I − G I J
𝑟)* 𝑟)*

with parameters 𝜀 = 1 and 𝜎 = 1. Particle interactions beyond a cutoff distance of 5𝜎 are


neglected (i.e., 𝑢A𝑟)* C = 0 for 𝑟)* > 5𝜎).
(a) Modify the eng_force function in eng_force_lj.py to compute the total energy per particle
+
𝑈/𝑁 = - ∑).* 𝑢A𝑟)* C for the configuration provided in the file lj_config.xyz. The edge
length of the cubic unit cell for this system is 𝐿 = 11.383860000. Make sure to adhere
to the minimum image convention when computing separation vectors and scalar
distances 𝑟)* . If your code is working, you should get 𝑈/𝑁 = −6.399643774850674
(b) Modify the eng_force function in eng_force_lj.py to compute the net force acting on each
particle for the configuration provided in the file lj_config.xyz. Print the x, y, and z
components of the net force acting on particle 100 (index as 99 in the Python arrays). If
your code is working, you should get 𝐹( = −2.03011451 , 𝐹/ = 3.41106387 , 𝐹0 =
19.42208863.
(c) Compute 𝑈/𝑁 and the three components of the net force acting on particle 100 in the
configuration provided in the file lj_config2.xyz. Note that the unit cell length for this
system is 𝐿 = 11.777320000, which needs to be updated accordingly in the python script
before performing the calculation.

You might also like