The most important application of forcefields has been molecular dynamics. Molecular dynamics simulates the motion of particles in a system as they react to forces caused by interactions with other particles. In itself, this dynamical view of molecular systems can be important for studying time-dependent processes. However, two aspects of these simulations give them importance which goes far beyond their fundamental use. First, these calculations allow a system to sample conformational space. While an energy minimization calculation will find a local minimum in the potential energy surface, molecular dynamics calculations can cover a far broader sample of conformations. By giving each particle a velocity, molecular dynamics imparts kinetic energy to the system. This energy can be sufficient to enable the system to progress over barriers in the potential surface which could not be crossed in a gradient minimization procedure. A second very important factor in molecular dynamics is that the conformations produced during a simulation can form a thermodynamic ensemble. For instance, maintaining constant total energy, volume, and particles produces a microcanonical ensemble of conformations. Microcanonical dynamics is the easiest and most common form, but new methods have been developed to form other types of ensembles. This property allows one to calculate thermodynamics properties, such as relative free energies, from molecular dynamics simulations. This has been exploited recently with great success by free-energy perturbation calculations.
Molecular dynamics calculations evaluate the forces acting on each particle and use these to determine the accelerations these particles undergo. Particle velocities are initially determined by a random distribution calibrated to give a Maxwell-Boltzmann distribution at a given simulation temperature, but the velocities are updated according to the calculated accelerations. Most molecular dynamics methods work in Cartesian coordinates, allowing the maximum degrees of freedom for particles. Each particle has three Cartesian degrees of freedom (). These degrees of freedom are uncoupled: forces, velocities, and accelerations are determined for each degree of freedom independently of the other degrees of freedom, with the exception that the overall translation and rotation of the system are subtracted out. The forces acting on particle are the opposite of the gradient:
Since the Cartesian degrees of freedom are uncoupled, each force component, is calculated separately:
The accelerations, , are calculated from Newton's equation of motion:
where is the mass of particle . Ideally, velocities would be updated from accelerations by analytical integration of the equations of motion as in Equation (), where is the -component of the velocity vector at time :
Unfortunately, an analytical equation for would be extraordinarily unwieldy, except for very simple systems, so the integration in Equation () must be done numerically.
There are numerous methods for doing numerical integrations and many of these have been used in molecular dynamics. The simulations reported here use the most popular of the methods, the Verlet algorithm. The verlet algorithm, itself, has many formulations, of which we use the ``leapfrog formulation,'' so named because velocities and coordinates are updated at half-timestep intervals after one another. Methods for numerically integrating the equations of motion generally divide the simulation into timesteps, , which are shorter than the periodicity of the fastest motions in the system. Typically, a timestep of one femtosecond ( s) is used, to enable accurate integration of O-H and N-H bond stretches. In the leapfrog Verlet algorithm, the velocities at timestep are obtained from the previous velocities and the new accelerations:
The new velocities are then used to update the coordinates to timestep :
These new coordinates are then used to calculate the forces as in Equation () and the process is repeated.