Predicting the conditions in which a compound adopts a metastable structure when it crystallizes out of solution is an unsolved and fundamental problem in materials synthesis, and one which, if understood and harnessed, could enable the rational design of synthesis pathways toward or away from metastable structures. Crystallization of metastable phases is particularly accessible via low-temperature solution-based routes, such as chimie douce and hydrothermal synthesis, but although the chemistry of the solution plays a crucial role in governing which polymorph forms, how it does so is poorly understood. Here, we demonstrate an ab initio technique to quantify thermodynamic parameters of surfaces and bulks in equilibrium with an aqueous envir...