Professional Documents
Culture Documents
Project Report Molecular Dynamics CMSC6920
Project Report Molecular Dynamics CMSC6920
simulation
January 2011
Preamble
Classical molecular dynamics (MD) simulations are based on integrating Newtons Second Law of motion to obtain trajectories of particles interacting through
classical potentials. Typically, thousands, if not millions, of particles are simulated with MD. The applications of MD are many and varied, ranging from simulations of liquid argon atoms to better understand the process of crystallization,
to simulations of proteins embedded in lipid bilayers useful for understanding
biological functionality in such systems, to drug design.
Several very well written MD software packages are available for commercial
and academic use, and nowadays are used almost like black boxes to produce
results. The purpose of this project is to deal with some of the nuts and
bolts of integrating the equations of motion in order to better understand the
numerical methods typically employed. We will also use MD to study a physical
problem, that of diffusion in a confined liquid.
The background information on MD and details of its implementation is
provided by the class notes (and references provided therein). As a starting
point, a basic MD code is found in a .tgz file on the course website. It is a
slightly modified version of the code associated with Exercise 10 available at
molsim.chem.uva.nl/frenkel smit.
Your (hardcopy) written report should include graphs and tables as appropriate to present simulation data, along with accompanying explanatory text.
Please also email an archived version of your code, scripts and data (e.g. a single zipped tar file). The directory structure organizing your data should make
it easy to understand what you have done, and to test your results. Include
README files if necessary.
you should find two subdirectories Source and Run. To compile and run
the program, do the following (you may need to change the name of the
compiler in Makefile in the Source directory).
cd StarterCode
cd Source
make
cd ../Run
./run
less out
We will observe that the total energy is not constant. This is because the
code contains errors, 2 errors in integrate.f and 1 error in force.f. Find the
three errors so that the energy is conserved.
Become acquainted with the code paying attention to how it initializes
particle positions and velocities, how temperature is specified, what the
key variables are etc. The program produces a system.pbd file (Protein
database format) that contains a sequence of configurations. This file
can be used as input to viewing program such as VMD (available at
www.ks.uiuc.edu/Research/vmd) to generate a movie.
2. Using the default temperature, density and time step provided in the
run script, run the system long enough so that it well equilibrated. Plot
the potential energy as a function of time to show that it is fluctuating
about an mean value. Determine the mean value. Using the block average
method shown in class, determine the error in the mean value and provide
a plot of the variance in the mean as a function of block length. Your time
series should be long enough to produce an error of less than 1%.
3. The quality of integration of the equations of motion in the N V E ensemble
can be gauged by the energy drift
Nt
E(0) E(it)
1 X
,
E(t) =
Nt i=1
E(0)
where E is the instantaneous total energy of the system (kinetic plus potential), t is the step size, and Nt is the total number of MD steps.
Employing the starter N V E code (and same state point as before),
produce a plot of E as a function of t. Try modifying mdloop.f
in order to calculate E. Ensure that for each t, the number of
time steps is adjusted so that the physical time is 100 reduced time
units, e.g. for t = 0.001, use Nt = 1 105 . Choose t to range
from 101 to 104 . Based on your graph, justify what a reasonable
time step is for this state point.
Dynamics
Diffusion in a pore
Rather than continuing to simulate a bulk liquid, here we will simulate a liquid
confined in a model cylindrical pore. To do this, we employ periodic boundary conditions in the z-direction, while for the x and y directions we define a
confining potential to mimic the walls of a channel or pore,
16
,
Vp (r) =
Lr
p
where r = x2 + y 2 is the distance from the z-axis, and L is related to the
radius of the pore (see Fig. ??). For r > L, assume that the potential is infinite.
You will need to modify the force calculation to include the the effects of Vp in
your MD program. The system is now quasi one dimensional and we will only
concern ourselves with the mean square displacement in the z direction for the
purposes of calculating D. Be careful to handle periodic boundaries correctly.
3