# Does the Hamiltonian of an unbiased simulation change when the simulation moves from a stable basin to another?

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?
• Can the Hamiltonian be changed during the simulation?
– Camps
Jul 27 '20 at 11:41

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.