Winter Lab Project Report

download Winter Lab Project Report

of 21

Transcript of Winter Lab Project Report

  • 8/8/2019 Winter Lab Project Report

    1/21

    Study of molecular dynamics simulation of Lennard Jones uidWinter Project Report

    Prashant KumarUnder the Supervison of

    Prof. Balasubramanian SundaramChemistry and Physics of Materials Unit

    Jawaharlal Nehru Center for Advanced Scientic Research

    1

  • 8/8/2019 Winter Lab Project Report

    2/21

    Contents

    1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Theoretical study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Molecular dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    2.1.1 Conceptual description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Equilibrium molecular dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    2.2.1 Newtonian dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 Hamiltonian dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2.3 Phase space coordinates and trajectories . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.2.4 Ensembles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.5 Non Hamiltonian Dynamics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.2.6 Applications of Equilibrium molecular dynamics . . . . . . . . . . . . . . . . . . . . . . . 102.2.7 Extension of equilibrium molecular dynamics. . . . . . . . . . . . . . . . . . . . . . . . . . 11

    2.3 Lennard- Jones potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.4 Lennard-Jones liquid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 Simulation process and output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.2 Systems Simulated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Analysis and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

    2

  • 8/8/2019 Winter Lab Project Report

    3/21

    List of Figures

    1 Lennard-Jones Potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Position vs time graph (numerical and analytical) . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Velocity vs time graph (numerical and analytical) . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Velocity vs position (numerical and analytical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Velocity vs position (numerical and analytical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 Hamiltonian vs time (numerical and analytical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 RMS deviation of Hamiltonian vs time step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Position vs time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Position vs time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Position vs time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 Velocity vs time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Hamiltonian vs time(For simple harmonic oscillator Hamiltonian ) . . . . . . . . . . . . . . . . . 21

    3

  • 8/8/2019 Winter Lab Project Report

    4/21

    1 Introduction

    The basic laws of nature as we know them have the unpleasant feature that they are expressed in terms of mathematical equations that cannot be solved exactly except for the few special cases. Even the relatively

    simple equations of Newtonian mechanics becomes essentially unsolvable analytically if the system comprisesmore than two interacting bodies. For example, consider solving the equations of motions for planets in thesolar system. The solar system constitutes of a massive Sun and eight planets with different mass, size andseparation from the Sun. If we wish to study the trajectory of a planet, say earth, then its not only the Sunthat exerts force on earth but also the other planets along with their moons, the resultant of all these forcesgoverns the motion of earth. Other planets are also moving in there respective orbits which results in a varyingforce which further complicates the problem. The equations of motion for a such a many body problem turnout to contain elliptic integrals evaluation of which by pure mathematical methods is a not an easy task. Forsystems in which many bodies interact, equations of motion are far more complicated to solve.

    Numerical methods provide an alternative for solving such problems with a limited desired accuracy. Cal-culating the equations of motions at some nite time interval give the solution with nite accuracy. At present

    most of the material science deals with the properties of systems having many atoms and molecules, which canbe solved using numerical methods. Computer simulations allow us to obtain essentially exact results to a niteaccuracy for a given model system without having to rely on approximate theory.

    Studying material systems requires the understanding of molecular dynamics . Molecular dynamics sim-ulation provides accurate information about the relationship between the bulk properties of matter and theunderlying interactions among constituent atoms or molecule in the liquid, solid or gaseous state. Computersimulations provides the link between microscopic details of the systems (masses, interactions, molecular geome-try etc.) and macroscopic properties (equation of state, structural order parameters, transport coefficients etc. )Computer simulations can be used to simulate critical experimental conditions that are either difficult or nearlyimpossible to construct in real experiments. such as experiments under very high pressure and temperature orin zero gravity etc. The ever- increasing power of computers also makes it possible to get ever more accurateresults about larger and larger systems. This results in increasingly wide applications of molecular dynamics inchemistry, physics, biophysics, materials science and engineering, and in the industry as well.

    One such area of interest is room temperature liquids simulation . This area has attracted enormous interestin recent years as promising media for studying bulk properties of liquids as solvents . Bulk properties liketemperature variation of volume , congurations of atoms or molecules at different temperatures and pressures.The structural phase transition and dissolving properties , Interactions of liquid molecules with the solutemolecules. Most important use of knowing this informations is the industrial applications of different liquids aseffective solvents.

    In view of the limited duration of the Winter Project, and the need to develop a basic understanding of the molecular simulation processes before proceeding to address the more complex questions involved in liquidsimulations , the specic objectives of the study were dened as:1. Develop a basic understanding of simulation of molecular dynamics and related computer models

    2. Studying simple systems like 1-D SHO and nose Hoover oscillator3. Theoretical study of extensions of equilibrium molecular dynamics and how non-equilibrium molecular dy-namics is useful.All the codes have been written in FORTRAN 95 and have been attached at the end.

    4

  • 8/8/2019 Winter Lab Project Report

    5/21

    2 Theoretical study

    2.1 Molecular dynamics

    2.1.1 Conceptual description

    Molecular dynamics predicts the trajectories of atoms or molecules by direct integration of the equations of mo-tion governed by Newtons law of motion . With the appropriate specication of an inter-atomic potential andsuitable boundary conditions and given the initial position, velocity and force acting the position and velocityat any time T can be calculated treating the problem as classical many-body problemFor a system of N particles conned to volume V at temperature T, The position of N particles are specied bya set of N vectors, r(t) = ( r1(t), r2(t), ..., r N (t)) , where r j (t) is the position of j th particle at time t. Knowingthe {r(t)}at various instants means knowing the trajectory of the particles.A thermo-dynamical property or any observable is a statistical average of a function of the phase space coordi-nates. For an observable A statistical average < A > is calculated by the expression

    f ( )A( )d f ( )d

    (1)

    where = ( q1, q2, q3,..., p1, p2, p3,...) is phase space vector. f ( ) is the probability density function and A( ) isthe function of phase space coordinates, corresponding to the observable A. Generating phase space coordinatesof the system, helps in calculating various properties of the system . A computer simulation generates theinformation of phase space at the microscopic level and corresponding information is detailed into macroscopicterms (pressure, energy, etc.). The phase space vector can be generated using Molecular Dynamics techniques.For a system of N particle having total energy E dened as sum of total kinetic energy K and total potentialenergy V

    E = K+ V (2)andK=

    12

    mN

    j =1

    v2f (3)

    The prescribed inter-atomic potential V, depends on the positions of all the particles .

    V = V ( r1, r2, ..., r N ) (4)

    Particle trajectory is obtained by solving Newtons equations of motion i.e.

    m d2 r

    dt2= F (5)

    F being the force experienced by individual particles. The equations of motion for N particle system are coupledwith each other by the potential V. Therefore the equations needed to be solved are:

    md2 rdt2

    = r j V ( r), j = 1 ,.....,N (6)

    5

  • 8/8/2019 Winter Lab Project Report

    6/21

    This is a system of second-order , non-linear ordinary differential equations and r j for j greater than 2 the systemrepresents the many-body problem which can be solved only numerically to obtain the atomic trajectories . Forthe purpose the time interval is divided into many small segments, each of t . Given the initial condition,integration means advancing the system by increments of t .

    r(to) r(to + t) r(to + 2 t) ... r (to + N t t) (7)

    v(to) v(to + t) v(to + 2 t) ...v(to + N t t) (8)Where N t is the number of time steps making up the interval of integration. By Taylor series expansion , forthe particle j

    r j (to + t) = r j (to) + v j (t) t + (1 / 2) a j (t)( t)2 + ... (9)

    Writing a similar expression for r j (to t) , adding up the two expansions giver j (to + t) =

    r j (to

    t) + 2 r j (to) + a j (to)( t)2 + ... (10)

    It is to be noticed that left-hand side represents the position of particle j at the next time step t , whereas allthe terms on the right-hand side are quantities evaluated at time t0 and are known . The acceleration of theparticle j at time t0 is

    F j ( r (t o ))m . The same position can be repeated to move another step , and can be repeated

    as many times as one wants to generate a sequence of positions (or trajectories ) for as long an interval asdesired . There are more elaborate and standard ways of doing this integration as in formal numerical methods,but the idea remains the same.

    These Trajectories are the raw outputs of molecular dynamics simulations . A general ow chart of any moleculardynamics simulations can be shown as , (a.)Set the particles positions (b.)Assign particle velocity (c.)Calculate force on each particle (d.)Move particle by a time step of t (e.)Save current position andvelocities (f.) If preset number of time steps are reached, stop otherwise go back to (c.) (g.) Analyzedata and print results .

    2.2 Equilibrium molecular dynamics

    2.2.1 Newtonian dynamics

    In the Newtonian interpretation of dynamics the translational motion of a spherical molecule is caused by aforce Fi exerted by some external agent . The motion and the applied force are explicitly related throughnewtons,s second law.

    F i = md2 ridt2 (11)

    Where m is the mass of the molecule which is independent of position, velocity and time. r i is a vector thatlocates the molecule with respect to a laboratory-xed set of coordinate axes . For N spherical molecules ,Newtons second law represents 3N second-order , ordinary differential equations of motion. If F i = 0 thensecond law reduces to

    dridt

    = constant (12)

    6

  • 8/8/2019 Winter Lab Project Report

    7/21

    That is , a molecule initially at rest will remain at rest and a molecule moving with a specied velocity willcontinue to move with that velocity until a force acts on it. This is Newtons rst law . Newtons third law saysthat any force exerted by molecule 1 on molecule 2 must be balanced by a force exerted by 2 on 1,

    F total = F 1 + F 2 = 0 (13)

    Hence F 1 = F 2 (14)

    With these ideas we can dene kinetic energy as the work required to move a spherical molecule from rest tovelocity r

    E k =12

    mr 2 (15)

    2.2.2 Hamiltonian dynamics

    Even though the force and positions changes with time, the functional form of Newtons second law i.e. F i = mriis invariant under time translations. There exists a function of the positions and velocities whose value is

    constant in time called Hamiltonian H,H ( rN , pN ) = constant (16)

    Here the momentum pi of the molecule I is dened in the terms of its velocity by

    pi = mr i (17)

    For an isolated system E (energy )remains conserved. For N spherical molecules H takes the form

    H ( rN , pN ) =1

    2mi

    p2i + V ( rN ) = E (18)

    H = 0 i.e. no explicit time dependence. On solving the total time derivative of isolated-system Hamiltonian weobtain the Hamiltons equations of motion(solved in appendix). These equations of motion are given as

    H ri

    = pi (19)H pi

    = ri (20)

    For a system of N spherical molecules the Hamiltons equations of motion are represented by 6N rst-order dif-ferential equations that are equivalent to Newtons 3N second-order differential equations. Using the Hamiltonsequations of motion we get:

    H r i

    = mr i = F i (21) F i =

    H ri

    = V ri

    (22)

    But this is merely the usual expression for a conservative force . That is , any conservative (non-dissipative )force can be written as the negative gradient of some potential function V.

    7

  • 8/8/2019 Winter Lab Project Report

    8/21

    In the Newtonian view motion is a response to an applied force. However , in the Hamiltonian view force donot appear explicitly; instead, motion occurs in such a way as to preserve the Hamiltonian function. There aresome assumptions made whike deriving the Hamiltons equations of motion which are: (a.)An isolated systemwas used. If the system could interact with surrounding then the Hamiltonian would contain additional terms

    for those interaction. In that case Hamiltonian would still be conserved but E would not.(b.)The Hamiltonian was not allowed to contain any explicit time dependence . If it did then H would not beconserved quantity.

    2.2.3 Phase space coordinates and trajectories

    The Hamiltonian H of a system is the sum of kinetic and potential energy, which are in itself a function of theset of coordinates qi and momentum pi for the i th particle; that is,

    q = ( q1, q2.......qN ) p = ( p1, p2....... pN )

    H ( q, p) = K( p) + V ( q)Hamiltonian varies as the interaction potential V varies. Solution of Hamiltons equations of motion for a systemof N particles gives the 6N dimensional phase space coordinate ( qN , pN ) We have seen that dH/dt = 0 i.e. Hremains constant in time. But r(t) and p(t) have explicit time dependence. The Hamiltonian H = Hr(t),p(t),is the constant of motion having a constant value E (energy). This is the energy conservation law. In principlethe system follows the trajectory constituted of only those phase points which satisfy the condition, H = E(constant). Consider N spherical atoms interacting through a prescribed V. The center of each atom is locatedby a position vector ri(t). As the atoms move

    ri (0) , pi (0) ri (t), pi (t)i = 1 , 2,...,N (23)Imagine plotting the positions and momenta of the N atoms in a 6-N -dimensional hyperspace called phasespace. Phase space is composed of two parts: a 3N dimensional conguration space ri (t) and a 3N-dimensionalmomentum space pi (t). A point in phase space represents all the position and momentum vectors. With timethe position and momenta changes, describing a trajectory in phase space. The rst objective of moleculardynamics simulations can be restated as computing the phase-space trajectory. A simple example is applicationto one dimensional simple Harmonic oscillator where the phase space trajectory is an ellipse.

    2.2.4 Ensembles

    The ensemble is a central concept in statistical mechanics. Imagine that a given molecular system is replicated

    many times over, so that we have an enormous number of copies, each possessing the same physical character-istics of temperature, density, number of atoms and so on. Since we are interested in the bulk properties of the system, it is not necessary for these replicas to have exactly the same atomic positions and velocities. Inother words the replicas are allowed to differ microscopically, while retaining the same general properties. Sucha collection of replicated systems is called an ensemble.Consider an isolated uid system of N particles, having xed internal energy E the Hamiltonian H = H ( rN , pN , V )If no other knowledge about the system is present ,then there is no reason of favoring any state with energyE over any other. It is, therefore postulated that all points in phase space with a given energy are equally

    8

  • 8/8/2019 Winter Lab Project Report

    9/21

    likely. The macroscopic properties of the uid can be obtained by averaging over the ensemble of xed energystates. This is the micro-canonical ensemble where the probability of occurrence of a given point in phase spaceis

    P micro (R) =[E H ( r, p)]

    (E, V )(24)

    where (E, V ) is the density of states chosen so that the sum of P micro over all states R is unity: (E, V ) =T r[E H ( r, p)] P micro shows that probability of nding a state for E = H(R,V) is maximum and goes to zerofor even a slight difference. It is important to notice that the micro canonical ensemble emphasis on the factthat Hamiltonian should remain conserved in time . Therefore Hamiltons equations of motion generates microcanonical ensemble . The Micro canonical ensemble involves difficult sums over states with constrained energies, so it is not much useful. Two other ensembles the canonical ensemble and the grand canonical ensemble arefar more useful. In the canonical ensemble the density matrix is exp(H ) where = T 1 (In computationalwork, numbers having very high or very low orders of magnitude, like Boltzmann constant kB is chosen equalto one) and the probability matrix is

    P c =e H

    Z N (T, V )(25)

    WhereZ N (T, V ) = T r [e

    H ] =1

    N !hdN e H dR (26)is the partition function. In the grand canonical ensemble the number of particles are allowed to vary, and theprobability of a given state is

    P gc =e (H N )

    (T,,V )(27)

    where(T, ,V ) = T r[e (H V ) ] (28)

    is the grand partition function . If we are able to calculate these partition functions, which principally requires

    calculation of Hamiltonian and energy of the system. we can calculate the Helmholtz free energy for the system,and from the Helmholtz free energy all the bulk thermodynamic properties can be calculated.

    2.2.5 Non Hamiltonian Dynamics.

    For the case of micro canonical ensemble the system was assumed to be isolated, if the other ensembles areconsidered then then in many cases it cannot be assumed. In such a case it is not possible to generate theensemble from the dynamical trajectory since the system does not follow the Hamiltons equations of motion.While real systems are considered , one assumes the presence of some external inuences, such as a heatbath(thermostat) or a mechanical piston(barostat)which maintain the system at constant temperature , pressureand so on. While generating the ensembles using any set of dynamical equations , these effects must some howbe accounted for and might , therefore , be best formulated in terms of non-Hamiltonian equations of motion.In cases where systems are driven away from equilibrium by some external eld to establish ow patterns , alsogive rise to non-Hamiltonian equations of motion . Let be the phase space vector = F ( ) represents theequation of motion for a general dynamical system .The non-Hamiltonian nature of these equations means thatthe compressibility, in general, does not vanish:

    = F

    = K( ) = 0 (29)

    9

  • 8/8/2019 Winter Lab Project Report

    10/21

    Expectation value of A over the distribution function f ( , t ) is given by:

    < A > = d ( g( )) A( )f ( , t )

    d (

    g( )) f ( , t )

    (30)

    Considering the Nose Hoover oscillator system, Here two oscillators are coupled with a chain. This system isconnected to external thermostat . The equations of motion for such a system is given by:

    qi =H p i

    (31)

    pi =H qi

    P Q

    pi (32)

    =P Q

    (33)

    P =

    N

    i=1

    H p i pi N f kB T (34)

    H = H ( p, q) +P 22Q

    + N f kB T (35)

    Where p is momentum corresponding to , Q is the mass parameter having units of energy* time 2 , thisdetermines how the heat bath evolves in time . This variable is referred to as Nose Thermostat . Theseequations are known as Nose Hoover equations and are of non-Hamiltonian form. They have the conservedenergy.

    2.2.6 Applications of Equilibrium molecular dynamics

    The best model system to study any theory is either ideal gas or simple harmonic oscillator . Since the resultsfor these systems are well established. In this project to we have studied the molecular dynamics principles on1-d simple harmonic oscillator using the Velocity Verlet algorithm .

    Consider a harmonic oscillator in one dimensions of mass m and force constant k, Hamiltonian for the systemis given as:

    H =p2

    2m+

    k(x x0)22

    (36)

    Hamiltons equations of motion for this system are:

    dx

    dt =

    p

    m (37)dpdt

    = k(x x0) (38)Solutions for position and momentum are given as:

    x = ( a x0)cos( km t) + x0 (39)10

  • 8/8/2019 Winter Lab Project Report

    11/21

    p = (km )(a x0)sin (kmt ) (40)These equations can be combined to write:

    (x x0)2(a

    x0)2

    +p2

    km (a

    x0)2

    = 0 (41)

    This is a equation for ellipse. Therefore particles trajectory is an ellipse in phase space.

    Numerical method for solving the simple harmonic oscillator system has been discussed in simulations section. When systems connected to external heat bath such Nose Hoover oscillator are considered, Hamiltonsequations of motion are no more valid for them . These systems follow the non Hamiltonian dynamics whereequations of motion are not the same as the Hamiltons equations of motion. Some extra terms are present forthese external interactions. Nose Hoover oscillators which are simple harmonic oscillators connected to NoseHoover thermostat, The equations of motion are of non Hamiltonian type.

    2.2.7 Extension of equilibrium molecular dynamics.

    Equilibrium molecular dynamics is able to explain interesting experimental phenomena with the aid of a micro-scopic picture,and has also provided predictive power. It is able to explain the equilibrium state and dynamicalnature of the system can also be studied through equilibrium molecular dynamics. An easy extension of theprinciples of equilibrium molecular dynamics is the computations of the properties of condensed matter systemsin the presence of external force elds. A experimentalist waits some time for the system under investigationto reach a steady state in the presence of applied eld. Measurements are the then performed to deduce thestructural or dynamical information. Performing this task on computer is what is known as nonequilibriummolecular dynamics(NEMD) . It is nonequilibrium in the sense that, in the presence of external eld, the systemin the steady state will be in the state of lower entropy. As the external eld is removed the system will returnto the state of maximum entropy or the equilibrium state. NEMD provides the framework to perform the sim-ulations in the way the experiment is done in laboratory. It can provide structural information in the presenceof the external eld strength, a task which equilibrium molecular dynamics is incapable to doing .

    2.3 Lennard- Jones potential

    The most widely used empirical potential is named for J.E. Lennard-Jones, the rst to use it extensively inanalyzing the properties of gases. It is the simplest of the model which gives potential energy curve similar tothe correct one. Lennard-Jones (LJ) Potential is a kind of pair potential. It depends only on magnitude of pairseparation r ij = |r i r j |. The interaction potential between a pair of atoms at a distance r is given by

    v(r ) = 4(( /r )12 ( /r )6) (42)

    The rst term represents the repulsive interactions which come into play when atoms are brought very closeto each other ( r ); Where is the distance of least approach. The second term (1/r )6 represents the

    attractive interactions which originate from van der Waals dispersive forces. This gives a long range attractivetail to the potential. The dispersion forces dominate the bonding character of closed shell systems (e.g. raregases like Argon, Krypton etc.) and thus, LJ potential mimics the actual potential well for these systems .V(r)=- occurs at the distance R= 2

    16 . LJ is not suited for open shell systems because here, strong localized

    bonds may form (as in covalent systems) or there may exist an electron sea where ions sit (as in metals). Inthese cases, two body interactions fail.

    11

  • 8/8/2019 Winter Lab Project Report

    12/21

    Fig. 1: Lennard-Jones Potential

    2.4 Lennard-Jones liquid

    The liquid systems for which Lennard-Jones potential mimics the actual potential to a greater extent can onlybe considered as Lennard-Jones liquid. Condensed Noble gases such as liquid Argon are simplest liquid forsimulations as:1. They have a closed shell system.2. The atoms have a spherically symmetric shape.3. Inter particle interactions are isotropic dispersion forces.Because of the dispersion forces a system of noble gas atoms in liquid phase is best mimicked by the Lennard-Jones Potential. Liquid structure In contrast to crystalline solids, liquids have a short range order. In fact,liquids are said to have an innite periodicity. The radial distribution function g(r) describes the ordering liquids very well. The pair correlation function is related to the probability of nding the center of a particle a givendistance from the center of another particle. It contains useful information about inter particle radial correlationand structure. This in turn describes the electrical, thermodynamic and other physical properties of liquids.The radial distribution function (RDF) is an example of a pair correlation function, which describes how, on anaverage; the atoms in a system are radially packed around each other. This proves to be a particularly effectiveway of describing the average structure of disordered molecular systems such as liquids.

    3 Methods

    3.1 Simulation process and output

    1. Initialization: First step to start the simulation is to assign initial positions, velocities and force to all the

    particles in the system.2. Evolving the sample from zero time: The system is evolved over a period of time (10000 time steps in

    this case) .First from the simple harmonic potential (1/2)Kx2, we generate corresponding values for forceafter each time step. The integration of the equations of motion is carried out using the Velocity Verletintegration algorithm. The Velocity Verlet Algorithm used for calculating the position and velocity aftereach time step is given below. Velocity Verlet Algorithm1. Given x(0) , v(0)

    12

  • 8/8/2019 Winter Lab Project Report

    13/21

    2. Get F(0)3. v( T 2 ) = v(0) + (

    T 2 )(

    F (0)m )

    4. x( T ) = x(0) + v( T 2 ) T 5. Get F ( T )

    6. v( T ) = v( T

    2 ) + ( T

    2 )(F ( T )

    m )The very next iteration is carried out by replacing x(0), v(0) by x(deltaT) and v(deltaT) Here, F =delU/delr insert the image ow chart g: Algorithm for MD simulation It can be shown that the errorsin this algorithm are of ( T 4), and that it very stable in MD applications and in particular conservesenergy very well.

    3. Simulation: The iterations are continued for a specied period. Physical quantities are measured ateach time step, and their thermal averages are computed as time averages. Using the above mentionedalgorithm, the velocities and coordinates and of each particle can be calculated at each time step.

    4. Outputs: With the above process, the following physical quantities were derived as functions of time.

    kinetic energy , potential energy , total energy , temperature (include expressions for each) Molecular dynamics

    proceeds by a numerical integration of the equations of motion. Each time step generates a new arrangementof the atoms (called a conguration) and new instantaneous values for bulk properties such as temperature,pressure, conguration energy etc. To determine the true or thermodynamic values of these variables requiresan ensemble average. In molecular dynamics this is achieved by performing the average over successive cong-urations

    generated by the simulation. In doing this we are making an implicit assumption that an ensemble average(which relates to many replicas of the system) is the same as an average over time of one replica (the systemwe are simulating). This assumption is known as the Ergodic Hypothesis. Fortunately it seems to be generallytrue, provided a long enough time is taken in the average. However it has not yet been rigorously provedmathematically. Fluctuations Most of the properties calculate for molecular systems are averages. All averagesare obtained by summing over many numbers of similar systems called ensembles. Thus in practice we expectthe average to show some dispersion - individual contributions are scattered about the mean value. In statisticalthermodynamics this dispersion about the average value is known as uctuation and it is both a subtle andimportant property of all physical systems. Most of the physical properties of a bulk system are driven byuctuations, and indeed can be calculated directly from them. For this reason it is possible to view uctuationsas even more fundamental than the average value.

    3.2 Systems Simulated

    The rst system which was simulated in the course of project is one dimensional simple harmonic oscillator.First algorithm used was Velocity-verlet for simulating the oscillator system. Single oscillator system with mass

    M=1.0 and force constant K=1.0 was assumed . Initial conditions for simulations were ; Initial position x(0)= 0.0 and initial velocity v(0) = 1.0 Simulations were performed for 5 different time steps of 0.0001 , 0.001 ,0.01 , 0.1 , 1.0 Results were compared for different time steps and with the corresponding analytical expression.Graphs plotted1. Position vs time(analytical and numerical)2. Velocity vs time(analytical and numerical)3. Velocity vs position( numerical)4. Hamiltonian vs time(analytical and numerical)

    13

  • 8/8/2019 Winter Lab Project Report

    14/21

  • 8/8/2019 Winter Lab Project Report

    15/21

    Fig. 3: Velocity vs time graph (numerical and analytical)

    Fig. 4: Velocity vs position (numerical and analytical)

    15

  • 8/8/2019 Winter Lab Project Report

    16/21

    Fig. 5: Velocity vs position (numerical and analytical)

    Fig. 6: Hamiltonian vs time (numerical and analytical)

    16

  • 8/8/2019 Winter Lab Project Report

    17/21

    Fig. 7: RMS deviation of Hamiltonian vs time step

    17

  • 8/8/2019 Winter Lab Project Report

    18/21

    Graphs from STORMER algorithm

    Fig. 8: Position vs time

    Fig. 9: Position vs time

    18

  • 8/8/2019 Winter Lab Project Report

    19/21

    Graphs from Runge-Kutta algorithm

    Fig. 10: Position vs time

    Fig. 11: Velocity vs time

    19

  • 8/8/2019 Winter Lab Project Report

    20/21

    Fig. 12: Hamiltonian vs time(For simple harmonic oscillator Hamiltonian )

    5 Analysis and Discussion

    1. For simple harmonic oscillator system the numerical results were in close agreement with the analyticalsolutions. For time steps of 1.0 the result was not much compatible with actual systems.

    2. The Hamiltonian remained conserved for all time steps and veries the equilibrium state of the system.Stormer and velocity verlet methods are compatible in their position vs time graph.

    3. The RMS deviation of Hamiltonian increases with increase in time step used from 0.01 to 1.00. Thepattern of rise was not dened but a polynomial t of the curve showed some complex exponential nature.This can be well understood by the fact as the time step increases the number of positions and velocitiespoints calculate is less. This results in a less accurate trajectory which is no more in accordance with theactual trajectory. With less number of points the probability of getting the energy value deviated fromactual value increase. This results in higher RMS deviation.

    4. It was observed that equilibrium molecular dynamics techniques are well applicable in systems like simpleharmonic oscillators. An analogy can be derived that for system under no any externally driven eld, theprinciples of equilibrium molecular dynamics are applicable.

    5. For the Nose Hoover oscillator system it was observed that simple harmonic oscillator Hamiltonianremains no more conserved(Fig(12)), that is, this Hamiltonian no more represents the total energy of thesystem. But H formulated by non Hamiltonian dynamics was conserved which is not a Hamiltonian for

    equations of motion of Nose Hoover oscillator. This H is still a conserved quantity, and also the energyis conserved for this system.

    6. Since non-Hamiltonian system tent to be more difficult to integrate than stably numerically . A betteralgorithms is required to integrate such systems. One such option is Trotters Factorization, this methodis powerful enough to simulate non-Hamiltonian systems. But due to lack of time where not tried.

    7. It can be concluded from the above discussion that for systems which does not follow Microcanonical

    20

  • 8/8/2019 Winter Lab Project Report

    21/21

    ensemble , the Hamiltons equations of motion are needed to be modied. The non Hamiltonian dynamicsis required for such systems . Velocity- Verlet algorithm is no more applicable in this case and some otheralgorithms are required for simulating such systems.

    8. simulation of Lennard Jones uid interacting with external system through molecular dynamics requiresunderstanding of non- equilibrium molecular dynamics and energy minimization techniques.

    In the given course of project I was just able to grasp some basics of the topic and was unable to simulate theLennard Jones uid system.

    6 Bibliography

    1. Classical Mechanics by Herbert Goldstein, 2nd edition, Pearson Edition

    2. Computational Statistical mechanics, William Graham Hoover, 2nd Elsevier, 1991

    3. Reviews in nonequilibrium molecular dynamics, Christopher J. Mundy , Sundaram Balasubramanian ,Ken Bagchi , Mark E. Tuckerman , Glenn J. Martyan, and Michael L. Klein.

    4. Reviews in computational chemistry, Volume 14, Wiley -VCH, John Wiley and Sons, Inc., New York,2000

    5. Computer Simulations of Liquids, M.P.Allen and D.J.Tidesley;

    6. Physical chemistry, R. Stephan Berry ,Stuart A. Rice , John Ross; Oxford University press

    7. Understanding Molecular Simulation, D.Frenkel and B.Smit

    8. Computational Physics Fortran version, Steven E. Koonin , Dawn C. Meredith; Addison Wisely publishingcompany.

    9. Computer Programming in FORTRAN 90 and 95, V.Rajaraman

    10. Principles of condensed matter Physics, Chaikin and Lubenskey ; Cambridge University Press

    11. Google Image search for Lennard Jones potential Diagram and Nose Hoover image.

    7 Acknowledgement

    This project on molecular dynamics simulation turned out to be a remarkable learning experience for me.Through this project not only I gained insight into the basics of molecular dynamics but also got an opportunityto hone my programming skills. I am grateful to Prof Balasubramanian for giving me the opportunity to workon this topic. I lack words to thank him for helping and guiding me throughout the project. He consistently

    encouraged me to explore the advanced topic in the eld of MD simulations. Last but not the least, I wish toextend my heartfelt and profound thanks to all my friends who helped me generously during the project.

    21