Wednesday, 25 February 2015

statistical mechanics - Why is the canonical ($NVT$) ensemble often used for (classical) molecular dynamics (MD) simulations?



Molecular dynamics (MD) simulation is a common approach to the (classical) many-body problem. It relies on integration of Newton's equations of motion to simulate the trajectories of many (e.g., ~1,000-100,000) particles.


In my limited exposure to the MD literature, a recurring theme that I think I see (at least on the chemical physics end of things) is that MD simulations are often performed in the canonical ($NVT$) ensemble. Why does this seem to be the case?




Here are the common thermodynamic ensembles:




  • Microcanonical ensemble ($NVE$)



    • The system is isolated.

    • The total energy $E$ is fixed.


    • Every accessible microstate has equal probability. That is, if $\Omega$ is the number of accessible microstates, the probability that a system is in a particular microstate is $\frac{1}{\Omega}$.

    • Please correct me if I am wrong, but I think that the microcanonical ensemble satisfies ergodicity -- time averages can be replaced with ensemble averages.




  • Canonical ensemble ($NVT$)



    • The system is not isolated. The system can exchange energy with a heat bath. The total energy of the system + bath is fixed. The average or equilibrium energy of the system is constant.

    • The absolute temperature $T$ is well-defined. (Is $T$ fixed? I think so.) $T$ is given by the temperature of the heat bath.

    • The probability of finding the system in some microstate $i$ with energy $E_i$ is given by the Boltzmann distribution: $$p_i = \frac{e^{-\frac{E_i}{k_B T}}}{\sum_i e^{-\frac{E_i}{k_B T}}}$$





  • Isothermal-isobaric ensemble ($NPT$)



    • The absolute temperature $T$ and the pressure $P$ are fixed.







Looking at this non-exhaustive list of choices, it seems that we can eliminate the $NVE$ ensemble from consideration because "real world" chemistry involves energy exchange with the environment.


MD simulations typically do not model chemical reactions, but still, I would say that most chemistry in the "real world" occurs at nearly constant pressure (e.g., atmospheric pressure). So the $NPT$ ensemble seems like a reasonable candidate.


What about the $NVT$ ensemble? Constant temperature perhaps seems reasonable for equilibrium, "real world" chemistry, but I am not so sure about constant volume.


Now let's jump back to my very rudimentary of MD simulations in the literature. In MD simulations, molecules sit in a simulation box to which periodic boundary conditions are applied. From reading some literature articles it seems that the $NPT$ ensemble is used for equilibration -- to obtain the simulation box size that gives an average pressure of, for example, 1 atm. Then, the system is simulated in the $NVT$ ensemble -- that is, the simulation box's dimensions are held fixed, hence fixing the system volume. It is from this simulation in the $NVT$ ensemble that ensemble averages are computed and the system's chemistry is analyzed.


Why is the $NVT$ ensemble used for MD simulation production runs?



Answer



To amplify on something in the Ron's answer: Fixed energy is hard to maintain numerically; the slight computational errors accumulate over time. The "thermalization" effects serve to fix this, and keep the overall system with a (relatively) stable average energy (large N).


No comments:

Post a Comment

Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...