Difference between revisions of "Best Practices"
John Chodera (talk | contribs) (Pasted content from Moin.) |
John Chodera (talk | contribs) (Edited link to 'decoupling and annihilation' page.) |
||
Line 12: | Line 12: | ||
== Guidelines for free energy calculation pathways == | == Guidelines for free energy calculation pathways == | ||
− | Alchemical free energies almost involve some insertion or deletion of atoms -- both in hydration free energy calculations, and in absolute and relative binding free energy calculations. By insertion and deletion, we mean decoupling or annihilation (see | + | Alchemical free energies almost involve some insertion or deletion of atoms -- both in hydration free energy calculations, and in absolute and relative binding free energy calculations. By insertion and deletion, we mean decoupling or annihilation (see [[Decoupling and annihilation]] for definitions) of the interactions of the atoms in question. We believe that a basic list of rules and guidelines should be followed in any calculation that involves insertion or deletion: |
* '''Rule 1''': Always use soft-core potentials while decoupling or annihilating Lennard-Jones interactions | * '''Rule 1''': Always use soft-core potentials while decoupling or annihilating Lennard-Jones interactions |
Revision as of 18:10, 9 October 2007
Best Practices
Here, we provide an overview of some of what we believe are the best practices for free energy calculations, with references, wherever possible. This document assumes you already have a basic idea of what these calculations are and what they do (if not, start with our FreeEnergyIntroduction), and that you already have a working knowledge of molecular simulations and basic terms like convergence and equilibration (if not, start with a textbook like Leach's Molecular Modelling: Principles and Applications). Simulation-package specific issues will not be addressed here.
To comment on this document, or suggest additional references or changes, please visit BestPracticesDiscussion. Ultimately, we will open this page up to public editing, but at present, we are working towards turning this into a review paper, so it is not publicly editable to simplify authorship issues.
Introduction
Free energy calculations are appealing, in that, in principle, they allow calculation of rigorously correct free energies, given a particular set of parameters and physical assumptions. We firmly believe that the goal of these calculations, then, should be to obtain these correct free energies given the particular assumptions -- and not necessarily to match experiment. Only then can the underlying parameters and physical assumptions really be tested. In other words, there exists a single right answer for a free energy calculation, given this particular set of parameters and physical assumptions, and our goal is to obtain it. Here, we will call these free energies "correct" free energies. "Correct", then, implies at the very least that the computed free energies have converged, and that there are no underlying methodological problems.
It is also important to remember in what follows that free energy is a function of state, so there are many possible choices of pathway for a thermodynamic cycle connecting the same two endpoints. Some pathways may be more efficient than others (sometimes by many orders of magnitude) so methods which are in principle correct may not always be practical.
Here, we discuss best practices in the context of several practical examples: Solvation free energies, and binding free energies. Solvation free energies provide a basic starting point for considering a number of the key issues, and, for binding free energies, there are many more choices of pathway, which raises additional complications. In both cases, there are also different methods for computing the relevant free energy differences, which may differ in efficiency.
Guidelines for free energy calculation pathways
Alchemical free energies almost involve some insertion or deletion of atoms -- both in hydration free energy calculations, and in absolute and relative binding free energy calculations. By insertion and deletion, we mean decoupling or annihilation (see Decoupling and annihilation for definitions) of the interactions of the atoms in question. We believe that a basic list of rules and guidelines should be followed in any calculation that involves insertion or deletion:
- Rule 1: Always use soft-core potentials while decoupling or annihilating Lennard-Jones interactions
- Rule 2: Never leave a partial atomic charge on an atom while its Lennard-Jones interactions are being removed
- Guideline 3: It is usually more efficient to perform electrostatic and Lennard-Jones transformations separately
- Guideline 4: Inserting or deleting atoms is usually less efficient than mutating them, so transformations should involve as few insertions and deletions as possible.
It is worth looking at each of these in more detail.
Rule 1: Soft core potentials
Rule 1 -- that soft core potentials should always be used when turning on or off Lennard-Jones interactions -- really should be a rule observed by all free energy calculations, we believe. Lennard-Jones interactions between particles have a really steep ($$1/r^12$$) rise in potential energy. This prevents particles from overlapping. However, to delete particles (atoms or molecules) these interactions need to be turned off somehow, and this is not as straightforward as it might seem.
One relatively-commonly used choice (Fowler et al., 2005, Chipot, Rozanska and Dixit, 2005, AMBER, and others) for turning these off is simple linear-scaling of that term in the potential energy or Hamiltonian: That is, $$V=(1-lambda)*V_0+lambda*V_1$$, where $$V_0$$ is the potential energy with full Lennard-Jones interactions, and $$V_1$$ is the potential energy where the Lennard-Jones interactions have been turned off for the atoms which are being deleted. This means that, for the atoms being deleted, Lennard-Jones interactions scale at small $$r$$ as $$(1-lambda)/r^12$$. This has two unfortunate and interconnected consequences. First, there is a discontinuous change in the form of the interaction potential when going from $$lambda=1-epsilon$$ (where $$epsilon$$ is a very small number) to $$lambda=1$$, as the $$1/r^12$$ term still is fairly important even at $$lambda$$ very near 1, but is entirely turned off at $$lambda=1$$. Secondly, it leads to large forces, numerical instabilities, and other problems in simulations near $$lambda=1$$. Formally, it has been shown that this leads to a non-integrable singularity in $$(dV)/(d lambda)$$, which means that computing correct free energies with this scheme using thermodynamic integration is even in principle impossible (Mruzik et al., 1976,Mezei and Beveridge, 1986, Resat and Mezei, 1993 and especially Beutler et al., 1994 and Pitera and van Gunsteren, 2002 and references therein) and similar problems plague free energy perturbation schemes.
In an attempt to get around this, some have suggested scaling the potential energies with $$(1-lambda)^k$$, where $$k$$ is an integer greater than 1. It can be shown that, for $$k>=4$$, this leads to an integrable singularity in $$(dV)/(d lambda)$$, so thermodynamic integration can in principle be done (Mezei and Beveridge, 1986, Beutler et al., 1994). But integrable singularities still pose very substantial problems for molecular simulation, and this approach can still lead to large forces, numerical instabilities (Beutler et al., 1994) and make free energy differences extremely difficult to converge ([D. Mobley, unpub. data]).
Since free energies are path-independent, an elegant solution to this problem was developed (Beutler et al., 1994) – to modify the Lennard-Jones functional form to gradually smooth out the $$1/r^12$$ term as a function of lambda, rather than simply multiplying it by a prefactor. This removes problems with numerical instabilities and singularities, and improves convergence properties (Beutler et al., 1994, Pitera and van Gunsteren, 2002). The basic idea is that it allows particles to gradually begin to overlap as $$lambda$$ is changed, rather than saving a drastic change in interactions for the point going from $$lambda=1-epsilon$$ to $$lambda=1$$. This approach is known as soft core potentials, and has subsequently been shown to be a nearly optimal path for modifying Lennard-Jones interactions (Blondel, 2004. In some work, several groups have further tested this approach and found a slightly modified functional form and set of parameters than that originally proposed (Beutler et al., 1994) which leads to improved efficiency for free energy calculations (Shirts and Pande, 2005, [D. Mobley, unpublished data]); we recommend that the soft core potentials and parameters from that work be employed in all free energy calculations involving insertion or deletion of particles.
Some testing has suggested that the $$(1-lambda)^k$$ scaling approach may be essentially adequate for hydration free energy calculations ([D. Mobley, unpublished data],[T. Steinbrecher, unpublished data]) but our results indicate that even if this is true, it still less efficient there than soft-core potentials, so this does not affect our recommendation.
In summary: Linearly scaling Lennard-Jones interactions back as a function of $$lambda$$ is formally incorrect, and leads to incorrect estimates of free energy differences. While more complicated schemes involving $$lambda^k$$ scaling can be formally correct, there are serious concerns regarding their accuracy. Soft-core potentials provide a rigorously correct, efficient alternative to these and should be used whenever particles are inserted or deleted, preferably with the functional form and parameters of ((Shirts and Pande, 2005), unless future work finds a still more efficient set of parameters.