# Simulate cluster in a heat bath

I want to simulate a cluster in a heat bath. I always thought I had to simulate it first in the microcanonical ensemble (N,V,E) until I reach the equilibrium. In the equilibrium the temperature will stay more or less constant (but with fluctuation). As soon as I reach that state I can start the system again in a canonical-(N,V,T) ensemble and I can work as if I have a heat bath - because in the (N,V,T)-ensemble the temperature will stay constant.

But now I read in the exercise sheets I have to proceed the thermalization run in the canonical ensemble and the production run (calculating the radial distribution function of a cluster) in the microcanonical ensemble. That sounds really strange to me.

In the plots the Temperture behaviour is plotted. I expected that the temperature should stay constant in a canonical ensemble.

• Hi! Welcome to PSE! Can you give more details about the exercise? The physical context matters. In general what you thought in the first place makes sense, and the distinction with the exercise sheets might be the physical picture. Are you simulating cluster formation/disappearance? Or maybe a phase transitions where clusters are a different phase than the rest of the matter? – rmhleo Mar 21 at 13:44
• Hello mhleo, thank you:)! In the exercise, we got an input geometry for different cluster sizes. For every cluster size we have to thermalize the system and in the second step, we have to compute the radial distribution function. Everything is calculated with cp2k. For me it is very confusing, that they start with the NVT ensemble to reach the equilibrium (with help of an csvr thermostat). Afterwards the production of the cluster-end-geometry is done in the NVE ensemble. I cannot understand why they chose this order. – Suslik Mar 21 at 13:52

The proposed sequence, although in principle not unique, does make sense.

Clearly the goal is to evaluate averages properties of a cluster of atoms in the vacuum at finite temperature.

Let start clarifying an important point about $$NVT$$ canonical ensemble. It describes a system of $$N$$ particles in a volume $$V$$ at thermal equilibrium with a thermostat at fixed temperature $$T$$. Notice that what is fixed is the temperature of the thermostat. The system of $$N$$ particles is not a system at constant kinetic energy. Therefore, the plot of the temperature of the cluster, i.e. of a quantity proportional to its kinetic energy, must show fluctuations even in the canonical ensemble. And it couldn't be different, since in a classical canonical ensemble one can evaluate analytically the variance of the kinetic energy, finding a non-zero value. The same for the total energy (sum of kinetic and potential energy of the cluster).

Let's come to the proposed protocol. If we want to study properties of a cluster at finite temperature (corresponding for example to a real cluster thermalized with an environment at fixed temperature), the first step is to start with a given atomic configuration adding (and subtracting) energy to the system until the average kinetic energy of the cluster corresponds to the target temperature within a given error bar. This heating step in principle could be accomplished in many ways. For example, an alternative could be a progressive continuous rescaling of velocities.

However, implementing an algorithm to simulate a canonical ensemble at the target temperature $$T$$ could be a more efficient way to reach quickly typical phase space configurations for a systema at temperature $$T$$.

After the equilibration phase, the next important step is to simulate the system at thermodynamic equilibrium at fixed temperature. It would be attempting to continue a canonical simulation and in principle nothing is wrong with such an approach. However, efficiency considerations suggest to use a different protocol.

Indeed, just referring to the starting considerations about the canonical ensemble, it turns out that there could be a problem in the case of long production runs to evaluate averages in the canonical ensemble: since the energy of the system must fluctuate, soon or later a rare large fluctuation would happen, making one or more atoms evaporating from the cluster. Nice effect to reproduce the real behavior of the cluster, but a disaster for the computational physicist who would like to collect data for an $$N$$ particle cluster. This is the main rationale for using a microcanonical ensemble during the production run.