# Time averages and ensemble averages

## Presentation on theme: "Time averages and ensemble averages"— Presentation transcript:

Time averages and ensemble averages
Values such as pressure or heat capacity generally depend upon the positions and momenta of the N particles that comprise the system. The instantaneous value of the property A can thus be written as : Average value of the property A can be calculated using integral approach:

Time averages and ensemble averages
For macroscopic numbers of atoms or molecules (of the order of 1023, Avogadro's number is × 1023 ) it is not feasible to determine an initial configuration of the system, and to later integrate equation of the motion which describe its temporal evolution. Boltzmann and Gibbs developed statistical mechanics, in which a single system evolving in time is replaced by a large number of replications of the same system that are considered simultaneously. The time average is replaced by an ensemble average:

A brief description of the Molecular Dynamics method
Molecular dynamics calculates the “real” dynamics, i.e. behavior of the system, from which the time averages of the system’s properties can be calculated. Molecular dynamics is a deterministic method, which means that the state of the system at any future time can be predicted from its current state. At each step, the forces on the atoms are computed and combined with the current positions and velocities to generate new positions and velocities a short time ahead. The force acting on each atom is assumed to be constant during the time interval. The atoms are then moved to the new positions, an updated set of forces is computed and new dynamics cycle goes on.

A brief description of the Molecular Dynamics method
Successive configuration of the molecular system ca be obtained by integrating Newton’s laws of motion. Positions and momenta of the particles of the given molecular system are described by the trajectories obtained by the successive integration of the Newton’s equations which are mathematical description of the following natural rules: A body continues to move in a straight line at a constant velocity unless a force acts upon it; Force equals the rate of change of momentum; To every action there is an equal and opposite reaction; The trajectories are obtained by solving the differential equations of the Newton’s second law:

Simple models Hard sphere potential Square well potential

Simple models Four-step procedure
Identify next pair of spheres to collide and calculate when the collision will occur; Calculate the position of collision; Determine the new velocities after collision Repeat steps 1, 2 and 3 until finished The new velocities of the colliding spheres are calculated by applying the principle of the conservation of the linear momentum.

Molecular Dynamics with continuous potentials
First MD with continuous potentials done in 1964 (simulation of argon by Rahman). Finite difference method: the integration is broken down into many small stages, each separated in time by a fixed time dt.

Verlet algorithm The most widely used method in molecular dynamics programs is the Verlet algorithm. It uses the positions and accelerations at time t, and the positions from the previous step, r(t-δt) to calculate new positions at t+δt, r(t+δt). Relations between positions and velocities at those two moments in time can be written as: Those two relations can be added to give: The velocities do not explicitly appear in the Verlet algorithm. They can be calculated in several ways. A very simple approach is to divide the difference in positions at times t+δt and t-δt by 2δt, i.e. Another approach calculates velocities at the half step : Practical application of this algorithm is straightforward and memory requirements are modest, only positions at two time steps have to be recorded r(t), r(t-δt), and the acceleration a(t). The only drawback is that the new position r(t + δt) is obtained by adding small term δ2ta(t) to the difference of two much larger terms 2r(t) and r(t-δt), which requires high precision for r in the numerical calculation.

Verlet algorithm The leap-frog method is the variation of Verlet algorithm. It uses the following relations: The name of this method comes from its nature, i.e., velocities make ‘leap-frog’ jumps over the positions to give their values at

Verlet algorithm The velocity Verlet algorithm gives positions, velocities and accelerations at the same time and does not compromise precision:

Verlet algorithm Beeman Algorithm
Better velocities, better energy conservation More expensive to calculate

Evaluate integration methods
Fast, minimal memory, easy to program Calculation of force is time consuming Conservation of energy and momentum Time-reversible Long time step can be used

Which algorithm is appropriate
Cost effective Energy conservation Root-mean-square fluctuation Total, 0.02 kcal/mol KE and PE, 5 kcal/mol

Choosing the time step Too small: covering small conformation space
Too large: instability Suggested time steps Translation, 10 fs Flexible molecules and rigid bonds, 2fs Flexible molecules and bonds, 1fs

Multiple time step dynamics
Reversible reference system propagation algorithm (r-RESPA) Forces within a system classified into a number of groups according to how rapidly the force changes Each group has its own time step, while maintaining accuracy and numerical stability Pseudo-code on page 364 using velocity Verlet

Molecular dynamics setup
Initial configuration Initial velocities (Maxwell-Boltzmann) Force field Cutoff: doesn’t save time by itself. But can combine with neighbor list and speed-up the simulation

Running molecular dynamics
Equilibration Special care is needed for inhomogeneous system Calculating the temperature Nc is the number of constraints, so 3N – Nc is the total number of degrees of freedom Boundary conditions No boundary Periodic boundary condition Non-periodic: reaction zone, harmonic constraint boundary atoms

Constraint dynamics High frequency modes takes all the computer time
Low frequency modes correspond to conformational changes Constraint: system is forced to satisfy certain conditions SHAKE: constraint the bond vibration