The self-consistent harmonic approximation (SCHA) allows the computation of free energy of anharmonic crystals considering both quantum and thermal fluctuations. Recently, a stochastic implementation of the SCHA has been developed, tailored for applications that use total energy and forces computed from first principles. In this paper, we extend the applicability of the stochastic SCHA to complex crystals, i.e., systems in which symmetries do not fix the inner coordinates and require the optimization of both the lattice vectors and the atomic positions. To this goal, we provide an expression for the evaluation of the pressure and stress tensor within the stochastic SCHA formalism. Moreover, we develop a more robust free-energy minimization algorithm, which allows us to perform the SCHA variational minimization very efficiently in systems having a broad spectrum of phonon frequencies and many degrees of freedom. We test and illustrate the approach with an application to the phase XI of water ice using density-functional theory. We find that the SCHA reproduces extremely well the experimental thermal expansion of ice in the whole temperature range between 0 and 270K, in contrast with the results obtained within the quasiharmonic approximation, that underestimates the effect by about 25%.
Pressure and stress tensor of complex anharmonic crystals within the stochastic self-consistent harmonic approximation / Monacelli, Lorenzo; Errea, Ion; Calandra, Matteo; Mauri, Francesco. - In: PHYSICAL REVIEW. B. - ISSN 2469-9969. - 98:2(2018). [10.1103/PhysRevB.98.024106]