Quasi-harmonic approximation with v-ZSISA

This example shows how to use the GSR.nc and PHDOS.nc files computed with different volumes to compute thermodynamic properties within the v-ZSISA method.

import os
import abipy.data as abidata

from abipy.dfpt.vzsisa import Vzsisa

# Root points to the directory in the git submodule with the output results.
root = os.path.join(abidata.dirpath, "data_v-ZSISA-QHA.git", "Si_v_ZSISA_approximation")

strains = [96, 98, 100, 102, 104, 106]
strains2 = [98, 100, 102, 104, 106] # EinfVib4(D)
#strains2 = [96, 98, 100, 102, 104] # EinfVib4(S)
#strains2 = [100, 102, 104] # EinfVib2(D)

gsr_paths = [os.path.join(root, "scale_{:d}_GSR.nc".format(s)) for s in strains]
ddb_paths = [os.path.join(root, "scale_{:d}_GSR_DDB".format(s)) for s in strains]
phdos_paths = [os.path.join(root, "scale_{:d}_PHDOS.nc".format(s)) for s in strains2]

qha = Vzsisa.from_ddb_phdos_files(ddb_paths, phdos_paths)
tstart, tstop = 0, 800

Plot Energies as a function of volume for different T

Energies as a function of volume for different T

Plot Volume as a function of T

Volume as a function of T

Plot Lattice as a function of T

Lattice as a function of T

Plot Lattice as a function of T”)

qha.plot_abc_vs_t(tstop=tstop, tstart=tstart, num=101, lattice="b")
Lattice as a function of T

Plot Volumetric thermal expansion coefficient as a function of T

Volumetric thermal expansion coefficient as a function of T

Plot Thermal expansion coefficient as a function of T

Thermal expansion coefficient as a function of T

Plot Angles as a function of T

Angles as a function of T

Plot Volume as a function of T. 4th order polinomial

Volume as a function of T

Plot Lattice as a function of T. 4th order polinomial

qha.plot_abc_vs_t_4th(tstop=tstop, tstart=tstart, num=101, lattice="a")
Lattice as a function of T

Plot Lattice as a function of T. 4th order polinomial

Lattice as a function of T

Plot Volumetric thermal expansion coefficient as a function of T

Volumetric thermal expansion coefficient as a function of T

Plot Thermal expansion coefficient as a function of T

Thermal expansion coefficient as a function of T

Plot Angles as a function of T.

Angles as a function of T

Create plotter to plot all the phonon DOS.

plot qha vzsisa

Total running time of the script: (0 minutes 7.637 seconds)

Gallery generated by Sphinx-Gallery