  A widely spread method of crystal preparation is to precipitate it from a
supersaturated solution. In such a process, control of solution concentration
is of paramount importance. Nucleation process, polymorph selection, and
crystal habits depend crucially on this thermodynamic parameter. When
performing simulations in the canonical ensemble as the crystalline phase is
deposited the solution is depleted of solutes. This unavoidable modification of
the thermodynamic conditions leads to significant artifact. Here we adopt the
idea of the constant chemical potential molecular dynamics approach of Perego
et al. [J. Chem. Phys. 2015, 142, 144113] to the study of nucleation. Our
method allows determining the crystal nucleus size and nucleation rates at
constant supersaturation. As an example we study the homogeneous nucleation of
sodium chloride from its supersaturated aqueous solution.
