  The phenomenon of solidification of a substance from its liquid phase is of
the greatest practical and theoretical importance, and atomistic simulations
can provide precious information towards its understanding and control.
Unfortunately, the time scale for crystallization is much larger than what can
be explored in standard simulations. Enhanced sampling methods can overcome
this time scale hurdle. Here we employ the on-the-fly probability enhanced
sampling method that is a recent evolution of metadynamics. This method, like
many others, relies on the definition of appropriate collective variables able
to capture the slow degrees of freedom. To this effect we introduce collective
coordinates of general applicability to crystallization simulations. They are
based on the peaks of the three-dimensional structure factor that are combined
non-linearly via the Deep Linear Discriminant Analysis machine learning method.
We apply the method to the study of crystallization of a multicomponent system,
Sodium Chloride and a molecular system, Carbon Dioxide.
