# Variational Morphing: Determining Free Energy Differences Through Optimal Non-Linear Lambda States

Free energy calculations based on atomistic Hamiltonians and sampling are key to a first principles understanding of biomolecular processes, material properties, and macromolecular chemistry. Here, we generalize the Free Energy Perturbation method and derive non-linear Hamiltonian transformation sequences for optimal sampling accuracy that differ markedly from established linear transformations. We show that our sequences are also optimal for the Bennett Acceptance Ratio (BAR) method, and our unifying framework generalizes BAR to small sampling sizes and non-Gaussian error distributions. Simulations on a Lennard-Jones gas show that an order of magnitude less sampling is required compared to established methods.

Gradients in free energies are the driving forces of physical and biochemical systems and enable quantitative descriptions of e.g. molecular recognition processes, drug binding, transmembrane transport, or functional conformational motions of proteins or complexes. To predict free energy differences computationally with high accuracy, Molecular Dynamics based state of the art methods use ‘alchemical transformations’, where sampling is not only conducted in the two final states of interest (e.g. two ligand types binding to a common receptor), but also in intermediate states. These are defined along a morphing path - typically a linear interpolation of the Hamiltonians (i.e. the total interaction energies) of the start and the end state. The term ‘alchemical’ refers to the fact that differing atoms are transformed from one type into another along the morphing path. Even though interpolated atom types do not exist in reality, the information gained from sampling in these intermediate states drastically improves the accuracy of the final free energy estimates.

However, linear transformations are still a very special case amongst all possible transformations. In this project, we therefore also considered non-linear transformations and analytically derived the intermediate states yielding the optimal accuracy free energy estimates. These states differ markedly from established linear transformations. An order of magnitude improvement in the amount of required sampling, and therefore, simulation time, was obtained for a test system with Lennard-Jones interactions.

## GROMACS Extension for Free Energy Calculations with Non-Pairwise Variationally Derived Intermediates

Gradients in free energies are the driving forces of physical and biochemical systems. The free energy difference between two states of a thermodynamic system is calculated using samples generated by simulations based on atomistic Hamiltonians. Due to the high dimensionality of many applications as in, e.g., biophysics, only a small part of the configuration space can be sampled. The choice of the sampling scheme critically affects the accuracy of the final free energy estimate. The challenge is, therefore, to find the optimal sampling scheme that provides best accuracy for given computational effort.

To improve accuracy, sampling is commonly conducted in intermediate states, whose Hamiltonians are defined based on the Hamiltonians of the two states of interest. We developed the variationally derived intermediates (VI) method: The VI intermediates yield, under the assumption of uncorrelated sample points, optimal accuracy. They differ fundamentally from the common intermediates in that they are non-pairwise, i.e., the forces on a particle are only additive in the end state, whereas the total force in the intermediate states cannot be split into additive contributions from the surrounding particles. Furthermore, an end state dependence on the path variable lambda has been introduced to avoid divergences for vanishing particles.

VI has been implemented into the GROMACS 2020 MD software package. The implementation is conducted such that previous non-pairwise potential forms from the literature, which have so far not yet been available in GROMACS, can also be used. The package including the VI extension can be downloaded, together with documentation, test and example cases from the link below.

**GROMACS Extension for Free Energy Calculations**

**Download the GROMACS software extension including documentation, test and example case**