The efficient and accurate calculation of how ionic quantum and thermal fluctuations impact the free energy of a crystal, its atomic structure, and phonon spectrum is one of the main challenges of solid state physics, especially when strong anharmonicy invalidates any perturbative approach. To tackle this problem, we present the implementation on a modular Python code of the stochastic self-consistent harmonic approximation (SSCHA) method. This technique rigorously describes the full thermodynamics of crystals accounting for nuclear quantum and thermal anharmonic fluctuations. The approach requires the evaluation of the Born–Oppenheimer energy, as well as its derivatives with respect to ionic positions (forces) and cell parameters (stress tensor) in supercells, which can be provided, for instance, by first principles density-functional-theory codes. The method performs crystal geometry relaxation on the quantum free energy landscape, optimizing the free energy with respect to all degrees of freedom of the crystal structure. It can be used to determine the phase diagram of any crystal at finite temperature. It enables the calculation of phase boundaries for both first-order and second-order phase transitions from the Hessian of the free energy. Finally, the code can also compute the anharmonic phonon spectra, including the phonon linewidths, as well as phonon spectral functions. We review the theoretical framework of the SSCHA and its dynamical extension, making particular emphasis on the physical inter pretation of the variables present in the theory that can enlighten the comparison with any other anharmonic theory. A modular and flexible Python environment is used for the implementation, which allows for a clean interaction with other packages. We briefly present a toy-model calculation to illustrate the potential of the code. Several applications of the method in superconducting hydrides, charge-density-wave materials, and thermoelectric compounds are also reviewed.
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 , in contrast with the results obtained within the quasiharmonic approximation, that underestimates the effect by about 25%.
Since 2014 the layered semiconductor SnSe in the high-temperature phase is known to be the most efficient intrinsic thermoelectric material. Making use of first-principles calculations we show that its vibrational and thermal transport properties are determined by huge nonperturbative anharmonic effects. We show that the transition from the phase to the low-symmetry is a second-order phase transition driven by the collapse of a zone border phonon, whose frequency vanishes at the transition temperature. Our calculations show that the spectral function of the in-plane vibrational modes are strongly anomalous with shoulders and double-peak structures. We calculate the lattice thermal conductivity obtaining good agreement with experiments only when nonperturbative anharmonic scattering is included. Our results suggest that the good thermoelectric efficiency of SnSe is strongly affected by the nonperturbative anharmonicity.