Equipartition and the Calculation of Temperature in Biomolecular Simulations

Michael P. Eastwood, Kate A. Stafford, Ross A. Lippert, Morten Ø. Jensen, Paul Maragakis, Cristian Predescu, Ron O. Dror, David E. ShawJournal of Chemical Theory and Computation 2010 · DOI

TL;DR

This paper introduces a new, more accurate method for calculating temperature in molecular dynamics (MD) simulations, addressing a common issue where standard methods show apparent temperature differences between different molecular motions. This new "pv" estimator, based on generalized equipartition and the concept of a "shadow Hamiltonian," reveals that these apparent differences are artifacts of numerical integration errors, not real physical phenomena.

What Problem Does This Paper Address?

Molecular dynamics (MD) simulations are crucial for understanding biomolecular behavior, and accurately controlling and measuring temperature is vital. A fundamental principle in statistical mechanics, the equipartition theorem, states that all degrees of freedom in an equilibrium system should have the same average kinetic energy, directly related to temperature. However, standard analysis of MD simulations often shows different calculated temperatures for different motions (e.g., protein vs. solvent, or different vibrational modes). This discrepancy, often referred to as a "hot solvent-cold solute" problem, is a symptom of simulation artifacts, primarily arising from the finite time step used in numerical integration. While this symptom is a useful diagnostic, it leaves the true simulation temperature uncertain and can lead to misinterpretations of molecular behavior. The authors aim to resolve this by developing a more robust temperature estimator that accounts for these integration errors.

Methods

The core of the paper lies in the development and application of a new temperature estimator. The authors leverage Tolman's generalized equipartition theorem, which is more broadly applicable than the standard equipartition theorem. They also introduce the concept of the "shadow Hamiltonian," which is the Hamiltonian whose exact dynamics are mimicked by the numerical integrator (like velocity-Verlet) over a single time step.

The key innovation is the "pv" temperature estimator, defined as $k_BT_{pv} = \langle p \cdot v \rangle_\mathcal{H_s}$, where $p$ is the canonical momentum, $v$ is the true velocity (not just $p/m$), and the average is taken over the ensemble generated by the shadow Hamiltonian $\mathcal{H_s}$. This is contrasted with standard estimators like the "$p^2$" formula ($k_BT_{p^2} = \langle p^2/m \rangle_\mathcal{H_0}$) and "$v^2$" formula ($k_BT_{v^2} = \langle mv^2 \rangle_\mathcal{H_0}$), which are shown to be susceptible to errors of order $\delta t^2$ (where $\delta t$ is the integration time step).

To obtain accurate velocities for the $pv$ estimator, the authors employ high-order polynomial interpolation of atomic positions sampled over multiple time steps. They also explore the use of multiple-time-step integrators (like r-RESPA) as a way to reduce truncation errors by treating fast, stiff interactions (e.g., bond vibrations) with smaller time steps than slower, softer interactions (e.g., nonbonded interactions).

Datasets

The paper uses two primary systems for evaluation:

  • Diatomic Fluid: A simplified system of 1000 oxygen-like diatomic molecules. This system was chosen for its simplicity, allowing for analytical comparisons with harmonic oscillator results, and for its ability to isolate truncation errors without the complexity of biomolecular force fields.
  • Solvated Ubiquitin Protein: A more realistic biomolecular system, consisting of a ubiquitin protein solvated in explicit water molecules. This system allows for testing the methods on complex, quasiharmonic motions characteristic of proteins.

No new benchmarks were introduced; rather, these established systems were used to validate the proposed temperature estimator and analyze the impact of integration errors.

Key Insights and Ideas

  • Apparent temperature differences are artifacts: The "hot solvent-cold solute" or "hot/cold motion" problems are not physical but are a consequence of numerical integration errors, specifically truncation errors related to the finite time step.
  • Generalized equipartition holds: Tolman's generalized equipartition theorem is robust and applies even with numerical integrators that introduce "shadow Hamiltonians." This means a single, well-defined temperature does exist for all motions in a stable simulation.
  • The "pv" estimator is key: The new $k_BT_{pv} = \langle p \cdot v \rangle_\mathcal{H_s}$ estimator accurately captures this single simulation temperature by accounting for the shadow Hamiltonian and using accurate velocity estimates.
  • Standard estimators are flawed: The commonly used $p^2$ and $v^2$ estimators are shown to have errors proportional to the square of the time step ($\delta t^2$), leading to the observed temperature discrepancies.
  • Thermostats can amplify errors: When thermostats are used with large time steps, they can exacerbate the errors introduced by the integrator, potentially leading to genuine temperature imbalances and heat flow, especially when multiple thermostats are employed.
  • Multiple-time-step integrators are beneficial: These schemes can significantly reduce truncation errors and improve temperature estimation accuracy, often at a modest computational cost.

Key Results

  • Diatomic Fluid: The $pv$ estimator showed that vibrational and translational temperatures were identical within statistical error across a range of time steps, confirming generalized equipartition. In contrast, $p^2$ and $v^2$ estimators showed significant deviations, with $p^2$ making vibrations appear cooler and $v^2$ making them appear hotter.
  • Ubiquitin: For quasiharmonic motions of ubiquitin, the $pv$ estimator showed temperatures to be largely independent of the mode number, consistent with generalized equipartition. The $p^2$ estimator, however, showed significant variations, with higher-frequency motions appearing cooler.
  • Thermostat Effects: In ubiquitin simulations, using two thermostats (one for protein, one for water) with large time steps led to a breakdown of generalized equipartition and apparent temperature differences of several Kelvin, whereas a single system-wide thermostat showed much smaller discrepancies.
  • Interpolation Accuracy: High-order polynomial interpolation (e.g., 8th order) was found to be sufficient to make interpolation errors substantially smaller than statistical errors in temperature estimation, even for relatively large time steps.

Limitations and Future Work

  • Approximation of Shadow Hamiltonian: For complex biomolecular force fields, the shadow Hamiltonian cannot be found exactly, and its expansion must be truncated. While this approximation is highly accurate for stable simulations, it is still an approximation.
  • Thermostat/Barostat Assumptions: The paper largely assumes that thermostats and barostats do not fundamentally alter the Hamiltonian dynamics. While this is often a reasonable assumption, the authors acknowledge that a rigorous analysis for all types of thermostats is complex.
  • Computational Cost: While the $pv$ estimator is more accurate, it requires more sophisticated velocity estimation (via interpolation), potentially increasing computational cost.
  • Future Work: The authors suggest that their findings highlight the utility of multiple-time-step integrators and that future work could focus on developing new integrators that increase accuracy efficiently, particularly for systems where nonbonded interactions are not the dominant computational cost. They also propose that coupling thermostats to lower-frequency motions might be a way to mitigate errors from the $p^2$ estimator.

Summary updated

Abstract

Since the behavior of biomolecules can be sensitive to temperature, the ability to accurately calculate and control the temperature in molecular dynamics (MD) simulations is important. Standard analysis of equilibrium MD simulations-even constant-energy simulations with negligible long-term energy drift-often yields different calculated temperatures for different motions, however, in apparent violation of the statistical mechanical principle of equipartition of energy. Although such analysis provides a valuable warning that other simulation artifacts may exist, it leaves the actual value of the temperature uncertain. We observe that Tolman's generalized equipartition theorem should hold for long stable simulations performed using velocity-Verlet or other symplectic integrators, because the simulated trajectory is thought to sample almost exactly from a continuous trajectory generated by a shadow Hamiltonian. From this we conclude that all motions should share a single simulation temperature, and we provide a new temperature estimator that we test numerically in simulations of a diatomic fluid and of a solvated protein. Apparent temperature variations between different motions observed using standard estimators do indeed disappear when using the new estimator. We use our estimator to better understand how thermostats and barostats can exacerbate integration errors. In particular, we find that with large (albeit widely used) time steps, the common practice of using two thermostats to remedy so-called hot solvent-cold solute problems can have the counterintuitive effect of causing temperature imbalances. Our results, moreover, highlight the utility of multiple-time step integrators for accurate and efficient simulation.
BibTeX
@article{eastwood2010equipartition,
  author = {Michael P. Eastwood and Kate A. Stafford and Ross A. Lippert and Morten Ø. Jensen and Paul Maragakis and Cristian Predescu and Ron O. Dror and David E. Shaw},
  title = {{Equipartition and the Calculation of Temperature in Biomolecular Simulations}},
  journal = {Journal of Chemical Theory and Computation},
  year = {2010},
  doi = {10.1021/ct9002916},
}
Figure