I wanted to understand the change in the Hamiltonian function as an unbiased simulation goes from one stable basin to the other.

  • Does the Hamiltonian stay constant or does it change as the unbiased simulation proceeds (in timestep)?
  • What determines this change?
  • $\begingroup$ Can the Hamiltonian be changed during the simulation? $\endgroup$
    – Camps
    Jul 27, 2020 at 11:41

1 Answer 1


This depends on your thermodynamic ensemble. If you are sampling from an $NVE$ ensemble, the energy function will stay roughly constant (but in practice there will be a positive energy drift which on average increases linearly with respect to time, due to discretisation errors).

In other more common ensembles, such as $NVT$, you sample from the relevant Boltzmann-like distribution, e.g. $\frac{e^{-\beta H(r,p)}}{Z_{NVT}}$, so yes, the values of the Hamiltonian will change as the simulation progresses, in order to sample from the appropriate distribution. The exact way these energies change over time largely depends on your thermostat (and barostat, if you are running in $NPT$). With stochastic thermostats and barostats, you get a discontinuous change in energy over time, while the extended Lagrangian thermostats and barostats basically run $NVE$ in an extended ensemble, so your energies will change continuously over time in this case. The exact form of that change needs to be derived uniquely for every combination of a thermostat and barostat.

Of course, there are other practical factors which will affect your energy over time as well, such as cutoffs, switching functions and long-range summations of the electrostatics, but the effects of these on the energy change over time are largely unpredictable (and often discontinuous), to the best of my knowledge.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .