Abstract
Designing an appropriate set of collective variables is crucial to the success of several enhanced sampling methods. Here we focus on how to obtain such variables from information limited to the metastable states. We characterize these states by a large set of descriptors and employ neural networks to compress this information in a lower-dimensional space, using Fisher's linear discriminant as an objective function to maximize the discriminative power of the network. We test this method on alanine dipeptide, using the nonlinearly separable data set composed by atomic distances. We then study an intermolecular aldol reaction characterized by a concerted mechanism. The resulting variables are able to promote sampling by drawing nonlinear paths in the physical space connecting the fluctuations between metastable basins. Lastly, we interpret the behavior of the neural network by studying its relation to the physical variables. Through the identification of its most relevant features, we are able to gain chemical insight into the process.
Introduction
In molecular dynamics (MD), many critical processes—such as protein folding or chemical reactions—occur on timescales far exceeding standard simulation capabilities. Enhanced sampling methods mitigate this by applying a bias to specific degrees of freedom known as Collective Variables (CVs). However, the design of effective CVs is a significant challenge, traditionally requiring extensive physical intuition or a prior hypothesis of the reaction mechanism. This work introduces Deep-LDA, a data-driven framework designed to discover optimal CVs using only information from the metastable states (the starting and ending points) of a process.
Methodology: The Deep-LDA Framework
The Deep-LDA approach integrates feed-forward neural networks with classical Linear Discriminant Analysis (LDA) to automate CV discovery. The process begins with a high-dimensional set of input descriptors, such as all interatomic distances between heavy atoms.
As shown in the architecture above, the neural network compresses these descriptors into a lower-dimensional latent space. Unlike standard classification tasks that use cross-entropy loss, Deep-LDA optimizes the network to maximize the Fisher’s ratio. This objective ensures that metastable states are maximally separated in the latent space while minimizing fluctuations within each state. A specialized loss function prevents the states from becoming overly narrow or infinitely distant, maintaining their utility for biasing simulations. The resulting CV is then employed with OPES (On-the-fly Probability Enhanced Sampling) to calculate the free energy surface (FES).
Results and Discussion
The method was validated on two systems: alanine dipeptide and an intermolecular aldol reaction. For alanine dipeptide, the model successfully handled a non-linearly separable set of 45 atomic distances, producing a free energy surface that matched reference data within 1.25 kJ/mol.
In the more complex intermolecular aldol reaction between vinyl alcohol and formaldehyde, Deep-LDA identified a concerted mechanism involving carbon-carbon bond formation and proton transfer.
A key insight of this work is that the transition state does not need to be known a priori. By maximizing the discriminative power between the initial and final basins, the neural network naturally identifies a non-linear path through physical space that connects them. Furthermore, the model's interpretability allows researchers to identify the most critical chemical contacts—such as specific bond distances—by analyzing the network's weights or output derivatives. This feature discovery correctly identified the three most critical chemical contacts (C1-C2, O1-H, and O2-H) out of 40 candidates in the aldol reaction.
Conclusion
Deep-LDA provides a robust, data-driven path for discovering collective variables without requiring pre-existing knowledge of transition mechanisms. While the method currently performs best when metastable basins are relatively adjacent, it offers a powerful tool for exploring complex chemical landscapes. Future developments may include iterative refinement of the CVs using data from biased runs to further enhance accuracy and capture intermediate states.
Summary updated