# softmatter:MC and MD in Various Ensembles

The same mathematical tools underlying conventional Molecular Dynamics (MD) and Monte Carlo (MC) (i.e., Newtonian dynamics and stochastic dynamics ) are generally applied to modify conventional MC and MD to sample the ensemble of choice.

## Schemes Using Newtonian Dynamics

In our discussion of Molecular Dynamics, we considered the Newtonian dynamics underlying MD to be the mathematical descriptor of the true physical nature of the system. That is, MD reflects the physical reality that atoms or molecules exert forces on one another and this causes the system to evolve. It is important to note, however, that Newtonian dynamics need not describe objects based in physical reality. In actuality, Newtonian dynamics, like Monte Carlo, is a mathematical sampling tool that can be used to describe an arbitrary mathematical system.

softmatter:Newtonian dynamics is the mathematical paradigm underlying of many of the methods that extend conventional NVE MD to sample other thermodynamical ensembles. For example, the method of Nose and Hoover involves associating fictitious masses, velocities and driving forces with a fictitious “thermostat,” which allows an MD simulation to correctly sample the softmatter:canonical ( NVT) ensemble. The Nose-Hoover thermostat is a mathematical abstraction that rescales particle velocities based on a fictitious driving force that increases in proportion to difference between the measured system temperature and the user-defined target temperature. Such so-called “extended system” methods can be applied to sample other thermodynamical ensembles as well. For example, the method of Andersen assigns fictitious Newtonian descriptors to a “barostat,” which allows the simulation cell to compress and expand in order to maintain constant pressure. Other examples of simulation schemes using Newtonian dynamics include the NPT scheme of Martyna et al., the flexible simulation cell method of Ramman and Parinello, and the hybrid ab-initio/MD method of Car and Parinello.

## Schemes Using Stochasticity

Whereas conventional MC simulation is more difficult to grasp than its Newtonian counterpart, the application of stochastic processes to extend conventional MC and MD simulation to sample other thermodynamical ensembles is relatively straightforward. Stochastic methods involve randomly manipulating simulation variables in a way that satisfies the laws of statistical mechanics. For example, the NVT MD scheme of Andersen involves drawing velocities from the expected Gaussian distribution and assigning them to particles at random. In MC simulations, reversible trial moves are attempted in analogy with trial particle moves in conventional MC (see Monte Carlo Simulation). For example, to sample the NPT ensemble, trial simulation cell expansion/compression moves are attempted to constrain the system pressure to a set value. Analogous trial moves can be carried out to sample a wide range of ensembles, including the Isotension-Isothermal Ensemble (trial simulation cell deformations), Grand-Canonical Ensemble (trial particle insertion/removal), etc.