Problem Set 1
Problem Set 1
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
(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
𝑟)* 𝑟)*