2.5 Molecular Dynamics
2.5.2 Constant temperature canonical ensemble
The microcanonical ensemble (N,V E); a fixed number of particles, constant system volume and constant volume, is far removed from simulating the behaviour of an experimental environment, where the temperature is typically controlled by the inclusion of a cellular environment, or the controlled temperature of a laboratory. Given that kinetic energy is the extensive counterpart to temperature, one could fix the total kinetic energy to approximate a specific temperature. However, this would not capture the true kinetic ensemble of the system. It would be experimentally more relevant to switch from the microcanonical ensemble to a canonical ensemble (N, V, T) by approximating an average temperature through the use of a thermostat. The temperature is allowed to fluctuate around an average by adding and removing energy to and from the system. A thermostat can also help avoid energy drifts caused by the accumulation of numerical errors during time integration.
There are several thermostats available including: velocity scaling (147); the Andersen thermostat (148); the Berendsen thermostat (149); the Nosé-Hoover thermostat (150); the Langevin (stochastic) thermostat (151); and the colored-noise Langevin thermostat (152). Below, we review the two thermostats used this study.
2.5.2.1 Berendsen thermostat
By coupling a thermal bath to the system, the velocities are gradually scaled proportional to the differences between the system temperature and the temperature of the thermal bath. Known as the Berendsen thermostat, it takes the form:
dT(t)
dt =
1
τ(T0−T(t)), (2.35)
whereτis the strength of the coupling between the heat bath and the system,T0is the desired
temperature andT(t) is the temperature at timet. At the limitτ→ ∞, the system approximates a microcanonical ensemble. This limit is never reached, and therefore the system never approximates a microcanonical ensemble. Yet, the Berendsen thermostat has the advantage of exponentially decaying towards an equilibrium without wildly oscillating, which makes it an ideal thermostat during early equilibration steps.
2.5.2.2 Nosé-Hoover thermostat
The Nosé-Hoover thermostat is implemented by extending the Langevin dynamics of the system by introducing an extra degree into the Hamiltonian of the system to take the form:
H(p,r,ps,s)= X i p2i 2ms2 + 1 2 X i,j,i,j U(ri−rj)+ p2s 2G +gkbT ln(s), (2.36)
whereGis a constant which controls the coupling strength,psis the momentum of the extra degree
of freedom,s, andgis the total number of degrees of freedom. The first two terms represent the kinetic energy and the potential energy. The third and forth terms are the kinetic and potential energy of the thermostat, respectively. Unlike the Berendsen thermostat, the Nosé-Hoover thermostat was shown to approximate a canonical ensemble, although the thermostat can fluctuate wildly for a system that is not in equilibrium (150). In addition, by replacing a coupled bath (that is to say,
the Berendsen thermostat) with an extra degree of freedom, the Nosé-Hoover thermostat has the advantage of being computationally inexpensive.
2.5.3 Constant pressure
The isothermal-isobaric (N, P, T) ensemble is a constant pressure extension to the canonical ensemble. Typically, this is achieved in one of two ways; a weak coupling to a pressure bath similar to the Berendsen thermostat, or an extension to the Hamiltonian by including an extra degree of freedom similar to the Nosè-Hoover thermostat.
2.5.3.1 Berendsen barostat
A Berendsen barostat (149) controls the pressure of a system by weakly coupling the system to an external pressure bath using the principal of least local perturbation. Coordinates and box vectors are scaled proportional to the compressibility of the system through exponential relaxation. The change in pressure over time is proportional to a diminishing approximation of the pressurePto a reference pressureP0: dP dt = P0−P τP (2.37)
The Berendsen barostat yields a simulation with the correct average pressure, however as the limit τp→ ∞is never reached, the algorithm fails to ever yield an exact (N, P, T) ensemble (153) .
2.5.3.2 Parrinello-Rahman barostat
The Parrinello-Rahman barostat (153) uses an extended ensemble algorithm to allow the volume and shape of the cell to fluctuate. The hamiltonian is extended by including a thermal reservoir termsand a friction parameterξ. The hamiltonian takes on the form:
H= K+V+Ks+Vs, (2.38)
whereKandVare the kinetic and potential energy terms, respectively, and the equation of motion becomes:
d2ri dt2 = mi Fi −ξdr dt. (2.39)
The acceleration of an atomiis reduced by some factorξddtr.
The Parinelo-Rahman barostat is similar in implementation by the addition of an extra degree of freedom to the Nosè-Hoover thermostat and as such if the system is far from equilibrium there is a tendency for the box the oscillate wildly. However, this algorithm does theoretically yield a simulation with an exact (N, P, T) ensemble.
2.5.4 Constraints
Ideally, the size of the time step used to evolve the Newtonian system should be small enough to capture all intramolecular atomic interactions, including the higher frequency intramolecular bond vibrations. Yet if this were the case, even the simplest of computer simulations would be excessively time-consuming. To resolve high-frequency vibrational motions, rather than reducing the time step bonded particles can be constrained, for example, by implementing the traditional SHAKE algorithm (154) or with the newer LInear Constraint Solver (LINCS) algorithm (155). Both algorithms make a correction to the set of new atomistic positions for all atoms connected by constrained bonds. During this study, all bonds were constrained using the Gromacs implementation of LINCS.