## 2 Materials and Methods  
### Anisotropic Stochastic Cell Rescaling  
We considered a system composed of \(N_{\text{at}}\) atoms with positions \(\{\mathbf{q}_{j}\}\) and momenta \(\{\mathbf{p}_{i}\}\), placed in a periodic cell \(\mathbf{h}\). The cell matrix was defined so that its columns are the vectors that generate the periodic lattice. Thus, the \(h_{ai}\) element represents the \(\alpha\) component, with \(\alpha=x,y,z\), of the \(i\)-th lattice vector. The goal of the introduced algorithm is to sample conformations from the \(N\)ST ensemble:  
\[\mathcal{P}_{N\mathbf{ST}}(\{\mathbf{q}_{i},\mathbf{p}_{i}\},\mathbf{h}) \propto(\det\mathbf{h})^{-2}\exp\left[-\frac{1}{k_{B}T}\Big{(}K+U+P_{0}\det \mathbf{h}+U_{\text{el}}(\mathbf{h})\Big{)}\right]. \tag{1}\]  
Here, \(k_{B}\) is the Boltzmann constant, \(T\) the temperature, \(K\) the kinetic energy of the system that depends on \(\{\mathbf{p}_{i}\}\), \(U\) the potential energy of the system that depends on \(\{\mathbf{q}_{i}\}\) and \(\mathbf{h}\), \(P_{0}\) the external hydrostatic pressure, \(\det\mathbf{h}\) the volume of the unitary cell, and \(U_{\text{el}}(\mathbf{h})\) an optional term allowing for an anisotropic external stress to be applied. The term \((\det\mathbf{h})^{-2}\) can be generalized to \((\det\mathbf{h})^{1-D}\), where \(D\) is the dimensionality of the system, which also holds when \(D\
eq 3\)[1]. An anisotropic external stress could be included by means of the energetic contribution \(U_{\text{el}}=\frac{1}{2}\text{Tr}(\mathbf{\Sigma}\mathbf{G})\), where \(\text{Tr}\) denotes the trace, \(\mathbf{G}=\mathbf{h}^{\text{T}}\mathbf{h}\) is called the _metric tensor_, and \(\mathbf{\Sigma}=V_{0}\mathbf{h}_{0}^{-1}(\mathbf{S}-P_{0}\mathbf{I})(\mathbf{ h}_{0}^{T})^{-1}\)[4]. Here, \(\mathbf{h}_{0}\) is a reference cell, \(V_{0}=\det\mathbf{h}_{0}\) its volume, \(\mathbf{I}\) the identity matrix, and \(\mathbf{S}\) the external stress. \(P_{0}\) is related to \(\mathbf{S}\) as \(P_{0}=\frac{\text{Tr}\mathbf{S}}{3}\), and the matrix \(\mathbf{S}-P_{0}\mathbf{I}\) is also referred to as _deviatoric stress_. A surface tension term could be alternatively added in the form \(U_{\text{tension}}=-\gamma_{0}A\), where \(\gamma_{0}\) is the tension and \(A\) is the area of the cell in the plane parallel to the interface [21]. In this case, \(P_{0}\) should be interpreted as the normal pressure to the surface \(A\). The most general first-order stochastic differential equation for the lattice vectors could be written in the following form:  
\[\text{d}h_{ai}=A_{ai}(\mathbf{h})\,\text{d}t+\sum_{\beta j}B_{ai\beta j}( \mathbf{h})\,\text{d}W_{\beta j}\,.\] (  
chosen accordingly. Namely, by conventionally defining a position-dependent diffusion matrix as:  
\[D_{ai\beta j}(\mathbf{h})=\frac{1}{2}\sum_{\gamma k}B_{ai\gamma k}(\mathbf{h})B_{ \beta j\gamma k}(\mathbf{h})\,, \tag{3}\]  
one should have:  
\[A_{ai}=\sum_{\beta j}D_{ai\beta j}\frac{\partial}{\partial h_{\beta j}}\Big{(} \ln\big{(}D_{ai\beta j}\,\mathcal{P}_{N\text{ST}}\big{)}\Big{)}\,, \tag{4}\]  
where the explicit dependencies of \(\mathbf{D}\) on lattice vectors and of \(\mathbf{A}\) and \(\mathcal{P}_{N\text{ST}}\) on both phase-space coordinates and lattice vectors were omitted for clarity. Aiming to reproduce a Berendsen-like deterministic term in Equation (2), we used the following _ansatz_ for \(\mathbf{B}\):  
\[B_{ai\beta j}=\sqrt{\frac{2\beta\tau k_{B}T}{3V\tau_{p}}}\delta_{ai}h_{\beta i}\,. \tag{5}\]  
Here, \(V=\det\mathbf{h}\) is the volume of the cell, \(\beta_{T}\) is an a priori estimate for the isothermal compressibility of the system, and \(\tau_{p}\) is the desired relaxation time for the volume.