-
Notifications
You must be signed in to change notification settings - Fork 5
Free energy calculations
This section discusses the preparation for relative and absolute free energy calculations using neural network potentials (NNPs). We outline the treatment of dummy atoms, the implications of energy mixing and parameter mixing approaches, and strategies that avoid generating unphysical states, ensuring a smooth and efficient transformation between the two topologies of interest.
The free energy between two states is given by
with:
-
$\Delta A_{i\mapsto j}$ as the Helmholtz free energy difference, -
$k_B$ as the Boltzmann constant -
$T$ as the temperature -
$Q_{i}$ and$Q_{j}$ are the configurational partition functions of states$i$ and$j$
The partition function
with:
$\beta = \frac{1}{k_BT}$ -
$U_i(\vec{x})$ as the potential energy of the system in state$i$ as a function of the coordinates$\vec{x}$
Important
Given the high computational cost and unfavorable scaling of memory consumption with the number of atoms when using NNPs, methods like expanded ensemble sampling, Hamiltonian replica exchange, or
These advanced sampling techniques allow for efficient exploration of the configurational space and can mitigate the computational challenges associated with NNPs in free energy calculations.
If we want to perform free energy calculations using dummy atoms, scaling interactions between atoms is necessary.
This can be achieved in multiple ways.
- mixing of endstate energies: we can remove the atom's contribution to the total energy by (1) masking atom-specific contributions during the reduction step from per-atom to per-system features and (2) removing atoms from the pairlist to mask their environment (pairwise) contributions. This allows the introduction of dummy atoms (but only in the binary sense: interaction or not-interacting, no scaling is possible). This approach simulates physical endstates (at integer
$\lambda$ values) and intermediate states by mixing endstate energies. It requires restraints to keep dummy atoms in position. - Decoupling atoms: We can scale the interaction between atom groups at the level of the message update function (for message-passing networks) or, more generally, at the level of the effective pair distances (e.g., implemented as 4D pair distances).
In alchemical free energy calculations, especially when transforming between molecules of different sizes or topologies, dummy atoms are introduced to maintain a constant number of particles. Dummy atoms are placeholders that do not interact with the environment or other atoms when fully decoupled. They facilitate transformations where a direct one-to-one mapping of atoms between initial and final states is impossible.
Challenges with dummy atoms in NNPs:
- Lack of intramolecular interactions: When dummy atoms are fully decoupled (no bonded or nonbonded interactions), they lack the forces necessary to maintain meaningful positions relative to the rest of the system.
-
Sampling inefficiency: without proper restraints, dummy atoms can drift freely, leading to poor phase space overlap between adjacent alchemical states (
$\lambda$ -states). This results in increased statistical errors and inefficient sampling. - Unphysical configurations: The training domain of the NNP restricts the use of dummy atoms to physical reasonable configurations that are evaluated. In other words, there can't be a carbon atom with five hydrogens.
These considerations limit the possible free energy approaches (e.g., single topology is not an option).
The dual topology/single coordinate method combines atoms from both the initial and final states into a single system with shared coordinates. Substructure matching is the base requirement to map two molecular graphs on each other.
This superset topology includes all atoms present in either state, and the interactions are modulated by a coupling parameter
There are two obvious ways to compute the free energy difference for such a setup: energy mixing and interaction scaling.
It involves expressing the total potential energy
Considerations:
- requires two separate evaluations (passes through the neural network), one for each topology, at each step.
- ensures physical realism of the configuration passed through the network
- trivial to implement
Most NNPs model many-body interactions as a set of pairwise interactions. There are two ways to scale atomic interactions:
Modulate the pairwise messages: for each atom
with:
-
$s_i^l$ as the embedding of atom$i$ at layer$l$ -
$m$ is the message function -
$\lambda$ is the scaling factor$\in [0,1]$ -
$d$ is the pairwise distance
Modulate the pairwise distances: An alternative approach is to make the pairwise distance
introducing a 4th dimensions coordinate
modifies this to
resulting in the following message update function
The advantage of such a dependency is that it can increase the distance between atoms until the cutoff distance
See Computing hydration free energies of small molecules with first principles accuracy for an application of this principle.
To perform absolute free energy calculations, we can decouple a molecule from its environment by scaling the messages between solute and solvent atoms: