Phonon calculations: Post-process

Overview

After the DFT force calculations (e.g., IBRION = -1 tag in VASP corresponding to electronic relaxation at fixed atomic positions) for the displaced supercells (POSCAR-0*) are finished in each FORCE-0* folder, the evaluation and analysis of interfacial phonons can be executed.

In this post-process execution, the dynamical matrix at each K-point is internally constructed by reading the DFT force file. The internal processes end with printing of the phonon properties, such as density of states (DOS), thermal properties (vibrational entropy and free energy), band structures, and phonon modes in the complete forms of both data files and graphics.

Post-process execution

As an example, let’s assume the DFT force file is vasprun.xml in VASP format and each force file resides in Phonon root/FORCE-0* folders. First, go to the Phonon root folder where the POSCAR file resides. Then, execute InterPhon post-process by one of the following ways: 1. Command line and 2. Python interpreter. If done successfully, files of phonon properties (band.dat, band.png, etc.) and Post-process record file (post_process.yaml) will be generated.

Note

Pre-process record file (pre_process.yaml) and supercell file (SUPERCELL), which are generated in previous Pre-process, should reside in the Phonon root folder with the DFT structure file of a targeted unit cell.

1. Command line

The following commands is for the simultaneous analysis for all of the supported phonon properties. If you don’t need some analyses, exclude corresponding flag options (Option tags).

Note

The K-point file (KPOINTS_dos and KPOINTS_band below), which is supported in VASP KPOINTS format, is required for the mesh sampling of k-points.

General long format:

$ interphon [DFT_force_files] --dft_code ['vasp' or 'espresso' or 'aims'] --kpoint_dos KPOINTS_dos --density_of_state --thermal_property --kpoint_band KPOINTS_band --phonon_band --phonon_mode

General short format:

$ interphon [DFT_force_files] -dft ['vasp' or 'espresso' or 'aims'] -kdos KPOINTS_dos -dos -thermal -kband KPOINTS_band -band -mode

Simple usage with the help of default setting of Option tags:

$ interphon FORCE-0*/vasprun.xml -kdos KPOINTS_dos -thermal -kband KPOINTS_band -mode

2. Python interpreter

>>> from InterPhon.core import PostProcess
>>> import glob
>>> user_args = {'dft_code': 'vasp', 'displacement': 0.02, 'enlargement': "4 4 1", 'periodicity': "1 1 0"}
>>> force_path = glob.glob('FORCE-0*/vasprun.xml')
>>> force_path.sort()
>>> post_dos = PostProcess('POSCAR', 'SUPERCELL', code_name=user_args.get('dft_code'))
>>> post_dos.set_user_arg(user_args)
>>> post_dos.set_reciprocal_lattice()
>>> post_dos.set_force_constant(force_path, code_name=user_args.get('dft_code'))
>>> post_dos.set_k_points('KPOINTS_dos')
>>> post_dos.eval_phonon()
>>> from InterPhon.analysis import DOS
>>> post_dos.dos = DOS(post_dos)
>>> post_dos.dos.set()
>>> post_dos.dos.write()
>>> post_dos.dos.plot()
>>> from InterPhon.analysis import ThermalProperty
>>> post_dos.thermal = ThermalProperty(post_dos)
>>> post_dos.thermal.set()
>>> post_dos.thermal.write()
>>> post_dos.thermal.plot()
>>> from copy import deepcopy
>>> post_band = deepcopy(post_dos)
>>> post_band.set_k_points('KPOINTS_band')
>>> post_band.eval_phonon()
>>> from InterPhon.analysis import Band
>>> post_band.band = Band(post_band)
>>> post_band.band.set()
>>> post_band.band.write()
>>> post_band.band.plot()
>>> post_band.band.plot_with_dos(dos_object=post_dos.dos)
>>> from InterPhon.analysis import Mode
>>> post_band.mode = Mode(post_band)
>>> post_band.mode.set()
>>> post_band.mode.write()
>>> post_band.mode.plot(unit_cell='POSCAR', code_name=user_args.get('dft_code'))  # This requires (Optional) ASE