  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 non-linearly separable dataset 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 non-linear
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.
