14.8. SrTiO3 : A self-consistent phonon example#

At a glance

Goal:

Stabilize the soft modes of cubic SrTiO3 at finite temperatures with the self-consistent phonon (SCP) method.

You will learn:
  • how to confirm the harmonic instability from the phonon dispersion

  • how to set up the &scph field (KMESH_INTERPOLATE, KMESH_SCPH, SELF_OFFDIAG)

  • how to obtain temperature-dependent phonon bands, mean square displacements, and free energies

Prerequisites:

Harmonic and anharmonic force constants (provided in reference/) and an MPI environment.

Example files:

example/SrTiO3

Run time:

The SCP calculation finishes in about 2 minutes with 4 MPI processes.

This page explains how to run a self-consistent phonon (SCP) calculation using ALAMODE. The target material is cubic SrTiO3, which is a well-known perovskite solid exhibiting soft phonons.

The example input files are provided in example/SrTiO3/reference.

Let’s move to the example directory

$ cd ${ALAMODE_ROOT}/example/SrTiO3

1. Prepare force constants and BORNINFO#

In this tutorial, we assume that the harmonic and anharmonic force constants (up to 4th order) are already calculated and only focus on the SCP calculation part. The calculation of anharmonic force constants is explained in BaTiO3 : Anharmonic interatomic force constants (IFCs).

To start an SCPH calculation, please copy the force constant files and BORNINFO as follows:

$ cp reference/STO_anharm.xml.bz2 .
$ bunzip2 STO_anharm.xml.bz2
$ cp reference/BORN .

Note

The anharmonic force constants were computed using the following settings:

  • VASP, PBEsol, ENCUT = 550 eV

  • 2x2x2 supercell of cubic SrTiO3 (40 atoms)

  • Harmonic force constants were computed using ordinary least squares

  • Anharmonic force constants were estimated using LASSO from 40 training structures

For more details, please see the original paper.

2. Phonons within the harmonic approximation#

Before moving onto an SCP calculation, let’s first confirm that the cubic STO is dynamically unstable within the harmonic approximation.

Please prepare an input file for band structure calculation (phband.in) as follows:

&general
 PREFIX = STO222_NA3
 MODE = phonons
 FCSFILE = STO_anharm.xml 
 NONANALYTIC = 3; BORNINFO = BORN
/

&cell
7.363
1.0 0.0 0.0 
0.0 1.0 0.0
0.0 0.0 1.0
/

&kpoint
1
G 0.0 0.0 0.0 X 0.5 0.0 0.0 51
X 0.5 0.0 0.0 M 0.5 0.5 0.0 51
M 0.5 0.5 0.0 G 0.0 0.0 0.0 51
G 0.0 0.0 0.0 R 0.5 0.5 0.5 51
R 0.5 0.5 0.5 M 0.5 0.5 0.0 51
/
 

Download phband.in

Please run anphon and plot the band structure as

$ ${ALAMODE_ROOT}/_build/anphon/anphon phband.in > phband.log
$ python ${ALAMODE_ROOT}/tools/plotband.py STO222_NA3.bands
../_images/STO_harm_na3.png

It is clear that phonons are dynamically unstable at the \(\Gamma\) and R points.

The unstable harmonic mode at the R point: the TiO6 octahedra rotate in antiphase while Sr and Ti stay still (displacements exaggerated).#

3. Phonons within the self-consistent phonon method#

Now, let’s include the finite-temperature effect using the SCP method.

Please copy phband.in to scph.in and edit scph.in as follows:

&general
 PREFIX = STO_scph2-2
 MODE = SCPH
 FCSFILE = STO_anharm.xml 
 NONANALYTIC = 3; BORNINFO = BORN
 TMIN =0; TMAX = 1000; DT = 50
/

&cell
7.363
1.0 0.0 0.0 
0.0 1.0 0.0
0.0 0.0 1.0
/

&kpoint
1
G 0.0 0.0 0.0 X 0.5 0.0 0.0 51
X 0.5 0.0 0.0 M 0.5 0.5 0.0 51
M 0.5 0.5 0.0 G 0.0 0.0 0.0 51
G 0.0 0.0 0.0 R 0.5 0.5 0.5 51
R 0.5 0.5 0.5 M 0.5 0.5 0.0 51
/

&scph
 SELF_OFFDIAG = 0
 MAXITER = 500
 MIXALPHA = 0.2
 KMESH_INTERPOLATE = 2 2 2
 KMESH_SCPH = 2 2 2
/

Download scph.in

Here, the &scph field is added to the input. The important parameters for the SCP calculation are KMESH_INTERPOLATE and KMESH_SCPH. The former defines the \(\boldsymbol{q}\)-point mesh used to solve the SCP calculation and perform (inverse) Fourier transformation of dynamical matrices, while the latter defines the \(\boldsymbol{q}\)-point mesh used to compute the renormalization term associated with the loop self-energy diagram. Also, SELF_OFFDIAG option controls whether the off-diagonal components of the loop self-energy are considered or not. In the above example, we neglect the off-diagonal components to make the calculation faster. We will see the effect of the off-diagonal components later.

Important

All \(\boldsymbol{q}\) points generated by KMESH_INTERPOLATE should be commensurate with the supercell size (of the harmonic force constant calculation) because \(\Delta D(\boldsymbol{q}) = D_{\mathrm{SCPH}}(\boldsymbol{q}) - D_{\mathrm{HA}}(\boldsymbol{q})\) is used to interpolate dynamical matrix, for which \(D_{\mathrm{HA}}(\boldsymbol{q})\) should be exact within the harmonic approximation (HA). In the above example, we employ a 2x2x2 supercell, so we should use KMESH_INTERPOLATE = 2 2 2 (or KMESH_INTERPOLATE = 1 1 1, which is less accurate).

Important

The \(\boldsymbol{q}_1\) points generated by KMESH_SCPH can be denser than KMESH_INTERPOLATE, but the latter coarser grid must be a subset of the former denser grid. For example, when we use KMESH_INTERPOLATE = 2 2 2, we can set KMESH_SCPH = 2 2 2, KMESH_SCPH = 4 4 4, and so forth, but KMESH_SCPH = 3 3 3, KMESH_SCPH = 5 5 5, … are not allowed.

Now, let’s run anphon using MPI parallelization.

$ export OMP_NUM_THREADS=1
$ mpirun -np 4 ${ALAMODE_ROOT}/_build/anphon/anphon scph.in > scph.log

The calculation finishes in ~2 minutes. When it is done, please check if the SCPH iteration reached convergence.

$ grep "conv" scph.log

We can see that the SCPH loop converged at all temperatures. In the working directory, the following files are created:

  • STO_scph2-2.scph.h5 : Anharmonic corrections to the dynamical matrix, \(\Delta D(\boldsymbol{q}, T) = D_{\mathrm{SCPH}}(\boldsymbol{q}, T) - D_{\mathrm{HA}}(\boldsymbol{q})\), and the temperature-dependent second-order force constants are stored. This file can be used to restart an SCP calculation with the same KMESH_* and SELF_OFFDIAG parameters.

  • STO_scph2-2.scph_dfc2 : Anharmonic corrections to the second-order force constants, \(\Delta \Phi(\boldsymbol{r}(\ell), T) = M^{\frac{1}{2}} \Delta D(\boldsymbol{r}(\ell), T) M^{\frac{1}{2}}\), are stored, where \(M\) is the diagonal matrix whose elements are atomic masses, and \(\Delta D(\boldsymbol{r}(\ell), T) = N_{q}^{-1} \sum_{\boldsymbol{q}} \Delta D(\boldsymbol{q}, T) e^{-i\boldsymbol{q}\cdot\boldsymbol{r}(\ell)}\). The same correction is also stored in STO_scph2-2.scph.h5: give this file as FCSFILE (or FC2FILE) together with FC2_TEMPERATURE to use the effective second-order force constants at that temperature in another anphon run (see also DFC2FILE). The scph_dfc2 file can be converted to the Quantum-ESPRESSO fc format with scph_to_qefc.py.

  • STO_scph2-2.scph_bands : Self-consistent phonon band structures at various temperatures.

Let’s plot the finite-temperature band structures.

$ gnuplot
gnuplot> set terminal qt font "Helvetica,20"
gnuplot> set ylabel "Frequency (cm^{-1})"
gnuplot> unset key
gnuplot> plot for [col=3:17] "< awk '{if ($1!=0.0) print $0}' STO_scph2-2.scph_bands" u 2:col w l lt 1
gnuplot> replot for [col=2:16] "STO222_NA3.bands" u 1:col w l lt 2

The soft modes are stabilized by the SCP calculation and exhibit significant temperature dependences.

Note

If you are interested, please check the dependence of the results on SELF_OFFDIAG and KMESH_SCPH values.

4. Thermodynamics from the self-consistent phonon method#

We next compute various thermodynamic functions, such as the vibrational free energy and the mean square displacement (MSD), using the SCP calculation. Please copy scph.in to scph2.in and edit scph2.in as follows:

&general
 PREFIX = STO_scph2-2
 MODE = SCPH
 FCSFILE = STO_anharm.xml 
 NONANALYTIC = 3; BORNINFO = BORN
 TMIN =0; TMAX = 1000; DT = 50
 DELTA_E = 1.0
/

&cell
7.363
1.0 0.0 0.0 
0.0 1.0 0.0
0.0 0.0 1.0
/

&kpoint
2
10 10 10
/

&scph
 SELF_OFFDIAG = 0
 MAXITER = 500
 MIXALPHA = 0.2
 KMESH_INTERPOLATE = 2 2 2
 KMESH_SCPH = 2 2 2
/

&analysis
 PRINTMSD = 1
/

Download scph2.in

We use the same PREFIX as before so that the code can restart the calculation from STO_scph2-2.scph.h5. The code can skip the most expensive part of the SCP calculation, so we run anphon without MPI:

$ ${ALAMODE_ROOT}/_build/anphon/anphon scph2.in > scph2.log

When the calculation finishes, the following files are created in the working directory:

  • STO_scph2-2.scph_dos : Phonon density of states at various temperatures

  • STO_scph2-2.scph_msd : Temperature-dependent MSDs for each atom

  • STO_scph2-2.scph_thermo : Heat capacity and vibrational free energies at various temperatures

These files can be plotted and processed easily. For example, let’s plot the MSD of Sr, Ti, and O atoms using gnuplot.

$ gnuplot
gnuplot> set terminal qt font "Helvetica,20"
gnuplot> set xlabel "Temperature (K)"
gnuplot> set ylabel "MSD (Angstrom^{2})"
gnuplot> plot "STO_scph2-2.scph_msd" u 1:2 ti "Sr, x=y=z"
gnuplot> replot "STO_scph2-2.scph_msd" u 1:5 ti "Ti, x=y=z"
gnuplot> replot "STO_scph2-2.scph_msd" u 1:8 ti "O_1, x"
gnuplot> replot "STO_scph2-2.scph_msd" u 1:9 ti "O_1, y=z"
../_images/STO_msd.png

We can see that the MSD of an oxygen is large in the plane perpendicular to the nearest Ti-O bond direction.

In the STO_scph2-2.scph_thermo file, vibrational free energies within the SCP theory are stored, which can be used to predict phase stability and thermal expansivity of anharmonic materials. In the file, 3-5 columns give vibrational free energies.

$ head -n 10 STO_scph2-2.scph_thermo
# The Cv data accounts for the QHA-like term only.
# Temperature [K], Cv [in kB unit], F_{vib} (QHA term) [Ry], F_{vib} (SCPH correction) [Ry], F_{total} [Ry], S_{vib} [in kB unit]
        0.000000      0.000000e+00   2.163221309368204e-02  -3.393171142478535e-04   2.129289597943419e-02     -0.000000e+00
       50.000000      1.986285e+00   2.160337595303467e-02  -3.628033806129984e-04   2.124057257242167e-02      7.284085e-01
      100.000000      5.492636e+00   2.109533713763898e-02  -4.684174160743994e-04   2.062691972156458e-02      3.183795e+00
      150.000000      8.069936e+00   1.980036868012979e-02  -6.283999265003507e-04   1.917196875362944e-02      5.846219e+00
      200.000000      9.879608e+00   1.771384093787374e-02  -8.226386797353489e-04   1.689120225813839e-02      8.338227e+00
      250.000000      1.113299e+01   1.489935392958330e-02  -1.043142300825495e-03   1.385621162875781e-02      1.058970e+01
      300.000000      1.200912e+01   1.143020963319938e-02  -1.285467676408400e-03   1.014474195679098e-02      1.260623e+01
      350.000000      1.263357e+01   7.374579379483088e-03  -1.546632125091690e-03   5.827947254391398e-03      1.441422e+01

The 3rd column is the QHA-like term and the 4th column is the correction term necessary for the vibrational free energy to satisfy the thermodynamic condition of \(S_{\mathrm{vib}}=-\frac{dF_{\mathrm{vib}}}{dT}\) . The 5th column is the sum of the 3rd and 4th columns, which gives the correct vibrational free energy within the SCP scheme. So, the values in the 5th column should be used for phase stability and thermal expansivity calculations. The 6th column gives the vibrational entropy.