• No se han encontrado resultados

A wealth of information can be gained by studying the dynamical behaviour of a system as

a function of time. This can be done using Molecular dynamics, MD. Successive configu-

rations of the system are generated by integrating Newton’s equations of motion, equation

2.9. This produces a trajectory that shows how the position of the atoms and momenta

evolve with time. Newton’s second law of motion states that force equals the acceleration,

F = ma. The trajectory is obtained by solving the differential equations embodied within

this law. d2x i dt2 = Fxi mi (2.9)

where mi is the mass of the particle moving in the direction of coordinate xi with force

acting upon the particle in the direction ofxi,Fxi.

In simulations of intermolecular interactions of realistic models, the force acting on each

atom is dependent on its position relative to that of the other atoms. Such a simulation uses

continuous potentials. Under the influence of a continuous potential the motion of such

systems is difficult to describe analytically as the coupled nature of the particles gives rise

to a many-body problem. It such circumstances it is necessary to use a finite difference

method to integrate the equations of motion.

2.5.1

Finite Difference Methods

Finite difference methods are used to generate MD trajectories for continuous potential

models by breaking down the integration into small steps separated by a fixed time, δt.

The choice of this time interval will be discussed in more detail later. From the positions

calculated as the vector sum of the force exerted by every other particle. The accelerations

of the particles are calculated from the forces and masses, according to Newton’s second

law. The accelerations are combined with the positions and velocities at timetto generate

the positions and velocities at timet+δt. The forces on the particles can then be calculated

from their new positions, the accelerations using the forces and the positions and velocities

calculated at time t + 2δt, and the process iterated up to the total desired duration of the

trajectory. All finite difference algorithms for integrating the equations of motion are based

on the assumption that an estimate of the positions and dynamic properties at any timet+

δtcan be approximated using the Taylor series expansion about timet:

r(t+δt) =r(t) +δtv(t) + 1 2dt 2a(t) + 1 6dt 3b(t) + 1 24dt 4c(t) +. . . (2.10) v(t+δt) = v(t) +δta(t) + 1 2dt 2b(t) + 1 6dt 3c(t) +. . . (2.11) a(t+δt) = a(t) +δtb(t) + 1 2δt 2c(t) +. . . (2.12) b(t+δt) = b(t) +δtc(t) +. . . (2.13)

whererrepresents the positions,vthe velocity (first derivative),athe acceleration (second

2.5.2

The Verlet Algorithm

The Verlet algorithm is the most widely used implementation of the finite difference method.

It is efficient, stable, has modest storage requirements and is easy to implement. In this al-

gorithm the positions and accelerations at timetand those from the previous step,r(t -δt),

are used to calculate the new positions at timet+δt. The relationship between the positions

and accelerations, and the velocities can be written as:

r(t+δt) =r(t) +δtv(t) + 1 2δt 2a(t) +. . . (2.14) r(t−δt) =r(t)−δtv(t) + 1 2δt 2a(t). . . (2.15)

These equations can be combined to give:

r(t−δt) = 2r(t)−r(t−δt) +δt2a(t) (2.16)

Disadvantages of the Verlet algorithm include the difficulty with which velocities can be

obtained due to the lack of an explicit velocity term. Indeed velocities can only be obtained

once the positions have been determined for the next step. Whilst velocities are not needed

to compute the trajectory, they are a useful estimate of kinetic energy. They can be obtained

using the following equation:

Velocities calculated using this equation are subject to errors in the order ofδt2.

Another disadvantage is the loss of precision produced when obtaining the positionsr(t+

δt). Here it is necessary to add a small term, (δt2a(t)), to the difference between two larger terms,2r(t) andr(t-δt) 203,226.

2.5.3

The Leap-frog Algorithm

Several variations of the Verlet algorithm exist and include the velocity Verlet and leap-frog

algorithms 227. GROMACS, which was used to produce the simulations presented within

this thesis, uses the leap-frog algorithm to integrate the equations of motion. The following

relationships are used in the leap-frog algorithm:

r(t+δt) =r(t) +δtv t+ 1 2δt (2.18) v t+1 2δt =v(t)− 1 2δt+δta(t) (2.19)

Firstly the velocitiesv(t+ 1/2t) are calculated from the velocities at timet- 1/2δtand the

accelerations at time t, equation 2.19. The newly calculated velocities and positions at time

r(t) are then used to determine the positions at time t + δt, equation 2.18. At time t the

velocities can be calculated using:

v(t) = 1 2 v t+1 2δt +v t− 1 2δt (2.20)

The velocities leap over the coordinates to give the next half-step values at timet+ 1/2δt.

At each stage the current positions r(t) and accelerations a(t) are stored together with the

half-step velocities v(t - 1/2 δt)). The leap-frog algorithm, although compensating some

of the disadvantages of the Verlet algorithm, has the disadvantage that the positions and

velocities are not synchronised. As a result it is not possible to calculate the contribution of

the kinetic energy to the total energy at the same time that the positions are defined.

Important considerations when choosing the integration algorithm is that it is time-reversible,

conserves energy and momentum and will allow the use of a long time stepδt 228.

2.5.4

Time Step

The choice of time step must balance the need to generate a ‘correct’ trajectory and one that

covers a sufficient proportion of phase space. If the time step is too small the trajectory will

not sample enough of the phase space. A time step that is too large may produce instabilities

in the integration algorithm as a direct result of atoms overlapping and causing regions of

high energy. Violation of energy would be caused as a result of these instabilities and thus

numerical overflow would cause the program to fail.

To maintain numerical stability, a general rule is that the time step should be one to two

orders of magnitude smaller than the fastest periodic motion within the system. The fastest

motion within a classical system is bond vibration. For a heavy-atom-hydrogen bond this

is 10−14 s, therefore the time step for a simulation containing such bonds should generally not exceed 0.1 femtoseconds (fs). This short time step clearly imposes limitations on the

attainable length of large-scale MD simulations. The time step can be increased when such

vibrations are frozen out by constraining bond lengths to their optimal values. This is a

reasonable assumption as the amplitude of C-H bond vibrations is small with respect to

other atom-atom distances at normal temperatures and such bond vibrations would have

little effect on the behaviour of the overall system. Bond lengths can be fixed using an

Documento similar