Using a set of forces defined using an interatomic potential (section 2.3), the temporal evo- lution of the atomic accelerations, velocities and positions can be determined according to Newton’s laws of motion [104]. By assigning kinetic energy to the system molecular dy- namics (MD) allows the atomic trajectories to be sampled. The gradient of the potential energy of an atom, φi(r(t)), with respect to position is used to determine the direction and
magnitude of the atomic acceleration:
¨r(t) =Fi(r(t))
mi =
−∇φi(r(t))
mi (2.11)
where in Cartesian coordinates the force on an atom, Fi, is given by the gradient of the
potential energy, ∇φi = ˆx∂φ∂xi + ˆy∂φ∂yi + ˆz∂φ∂zi, where the mass of the atom is mi and ¨r is the
acceleration.
The atomic configuration is used in conjunction with the interatomic potential, to determine the acceleration of the atoms at a given time t (equation 2.11). Using the velocity Verlet integration method [105, 106] it is possible to determine the atomic position and velocity at time t + δt as follows. A second order differential equation can be split into two first order differential equations - i.e. let a(t) = ˙v(t) = ¨r(t) and v(t) = ˙r(t). By Taylor expanding r(t + δt) about r(t) and v(t + δt) about v(t) one gets:
r(t + δt) = r(t) + δt ˙r(t) +δt 2 2 ¨r(t) + Oδt 3 (2.12) v(t + δt) = v(t) + δt ˙v(t) +δt 2 2 ¨v(t) + Oδt 3 (2.13)
All of the above terms can defined in terms of known quantities except for ¨v. However, Taylor expansion of ˙v remedies this:
˙v(t + δt) = ˙v(t) + δt ¨v(t) + Oδt2 (2.14)
All terms in equations 2.12-2.14 can then be expressed in terms of a(t), v(t) and r(t)
r(t + δt) = r(t) + δtv(t) +1 2δt
2a(t) (2.15)
v(t + δt) = v(t) +1
where the acceleration of an atom, a(t) is defined by the gradient of its potential energy, a(r) = −∇φi(r)
mi . This approch to solving Newton’s equations of motion means that information
about the position, r(t), and velocity, v(t), of atoms at time t is sufficient to determine the atomic trajectories for subsequent steps, that is,
• Calculate new positions, r(t + δt), using equation 2.15
• Determine a(t + δt) using equation 2.11 and the updated positions
• Calculate new velocities, v(t + δt), using equation 2.16 and start again.
By repeatedly solving the velocity Verlet equations the evolution of the system with time can be examined. Despite significant improvements in the computational power available system sizes are still very small (103-106atoms) compared to Avogadro’s number and simu- lations times are limited to the order of 10−9s [107]. As such, the MD simulations presented here are limited to nanometer-sized systems and nanosecond timescales. Underlying these system constraints is the need to keep the timestep to only 1 or 2 femtoseconds.
There are numerous issues with using such small system sizes in MD simulation to inves- tigate bulk properties. In particular, a system of only thousands of atoms has a far greater proportion of atoms at the surface compared to even the smallest crystals which are made up of billions upon billions of atoms. In order to imitate the behaviour of the bulk material periodic boundaries are used, such that the simulation box is surrounded by images of itself. Each atom in the primary simulation cell is repeated identically in each of the periodic cells. This has the effect of creating a system that imitates a bulk crystal but, because the atomic positions and velocities in the periodic cells are identical to those in the primary cell, the information must only be recorded once for the atoms in the primary cell. The atoms in the periodic cells are essentially only there to ensure the correct atomic forces in the primary cell. This is particularly important for ionic systems where the superposition of Coulombic forces due to a periodic arrangement of charged species creates a long range electrostatic field. Note that if the trajectory of an atom takes it over the periodic boundary it appears at the opposite side of the cell. As the primary cell size is increased the system becomes
closer to a true representation of the crystal. It is important to select the correct supercell size according to the feature that one is attempting to study: for example a grain boundary requires a much larger supercell size than the perfect crystal.
So far a classical view of the system, with precise equations of motion that map an initial state to all corresponding future states, has been given. However, there is a disconnect between these atomic trajectories and the measurable macroscopic properties. Statistical mechanics provides the link between atomic and macroscopic scales by using the concept of a thermodynamic ensemble. The thermodynamics ensemble represents all possible ar- rangements and momenta of a system that have a set of common extensive quantities. In molecular dynamics simulations it is implicit that the number of atoms remains the same regardless of the state of the system. It is, therefore, an extensive quantity. Similarly, the vol- ume and energy of the system also remain constant and are also extensive quantities. This is known as the microcanonical ensemble or, more commonly, the NVE (constant number, volume and energy) ensemble.
Bulk properties are calculated by ensemble averages, where an observable value is averaged over all states of a system with a weighting in favour of low energy states (in NVE this corre- sponds to high entropy states). Weighting towards low energy states essentially ensures the bulk properties are averaged according to the time spent in a given state. In molecular dy- namics this is achieved by taking an average of states sampled over a number of timesteps. However, the simulation must be in equilibrium to ensure the MD time average corresponds to the ensemble average and, thus, the true thermodynamic quantity.