Molecular Dynamics Simulations: Che 520 Fall 2009
Molecular Dynamics Simulations: Che 520 Fall 2009
Molecular Dynamics Simulations: Che 520 Fall 2009
http://www.ks.uiuc.edu/Gallery/Movies/ This movie illustrates the conduction of KCL through a silica nanopore. The nanopore has 1 nm radius, KCL is in solution and under 1 V bias
2
d 2ri
2
dt
Fi mi
i = 1,2,..., N
Measure properties after system has reached equilibrium, e.g. Energy, pressure, pair correlation functions
3
P( v ) = (2mkT )3/2
Initialization (cont.)
No need to start from Maxwell-Boltzmann, velocities are quickly randomized
subroutine init ! initialization of MD program sumv(1:3) = 0. ! sum of velocities along each coordinate sumv2 = 0. ! sum of squares of velocities do i=1,Npart do j = 1,3 xyz(j,i) = ran(seed)*L ! L is the box length v(j,i)= ran(seed)-0.5 ! random velocity sumv(j) = sumv(j) + v(j,i) sumv2 = sumv2 + v(j,i)*v(j,i) enddo enddo sumv(1:3) = sumv(1:3)/Npart fs = sqrt(3*(Npart-1)*T/sumv2) ! because COM does not move ! set COM motion to zero and mean kinetic T to desired value v(1:3,1:Npart) = fs*(v(1:3,1:Npart) - sumv(1:3)) rm(1:3,1:Npart) = xyz(1:3,1:Npart) - v(1:3,1:Npart)*dt return end!
6
Initialization (cont.)
As equilibration proceeds, temperature is going to drift away from its desired value. The mean kinetic temperature of the system at any time is:
Tkin (t ) = i = 1 3k( N 1)
N
miui2(t )
The factor N 1 appears because the center of mass (COM) is fixed in space. The velocity rescaling shown on slide 5 can be applied at any time; however, it is not a proper way to achieve constant-temperature conditions and it does not conserve energy.
7
The force calculation code segment is executed millions and millions of times, so be very careful how you write it!
8
No cutoff or shift is applied to the code above (will lead to instability and loss of energy conservation)
9
11
12
2 t =
Where is the fastest vibrational time scale in the system (see link). For typical soft matter systems with bending / torsional potentials, this is approximately 1 - 2 fs, depending on whether explicit-hydrogens and fixed bond lengths are used. For the LJ system, the reduced time is: [ For Ar, the unit of time is ~2 ps ]
t t* = /m
13
Liapunov Instability
r r = r(t )
For short times,
r(t ) For long times,
r(t ) exp( t ) : Liapunov exponent (positive)
14
15