Optical Properties of Materials Calculated from VASP

该博客详细介绍了如何利用VASP软件计算SiC的静态和频率依赖的介电特性。通过密度泛函微扰理论计算静态介电性质,探讨了独立粒子图像和局部场效应在频率依赖介电响应中的作用。同时,讨论了有限电场响应和离子对静态介电性质的贡献。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.Task

Calculation of the static and frequency dependent dielectric properties of SiC.

2. Static dielectric properties

2.1Density functional perturbation theory

Let us start with the calculation of the static dielectric properties. The most convenient way to determine the Born effective charges, dielectric-, piezoelectric tensors is by means of density functional perturbation theory (LEPSILON=.TRUE.).

- INCAR (see INCAR.LEPSILON)

ISMEAR =  0
SIGMA  =  0.01
EDIFF  = 1.E-8
   
## to get the Born effective charges
## and the macroscopic dielectric tensor
LEPSILON = .TRUE.
    
#LRPA = .TRUE.
#LPEAD = .TRUE.
   
## to get the ionic contribution
## to the macroscopic dielectric tensor
#IBRION = 8
   
## As an alternative to LEPSILON = .TRUE.
## you might try the following:
#LCALCEPS = .TRUE.
   
## and:
#IBRION = 6
#NFREE = 2

** - KPOINTS (see KPOINTS.8) **

8x8x8
 0
G
 8 8 8
 0 0 0

** - POSCAR **

system SiC
4.35
0.5 0.5 0.0
0.0 0.5 0.5
0.5 0.0 0.5
1 1
cart
0.00 0.00 0.00 
0.25 0.25 0.25

在这里插入图片描述
- The LRPA-tag
By default the dielectric tensor is calculated in the independent-particle (IP) approximation, you should see the following lines in the OUTCAR file:

HEAD OF MICROSCOPIC STATIC DIELECTRIC TENSOR (independent particle, excluding Hartree and local field effects)

and

MACROSCOPIC STATIC DIELECTRIC TENSOR (including local field effects in DFT)

which comes later in the OUTCAR file.
If one adds

LRPA=.TRUE.

to the INCAR above, the second instance will include local field effect only with respect to the response in the Hartree part of the potential, i.e., in the random-phase-approximation (RPA). Search for

MACROSCOPIC STATIC DIELECTRIC TENSOR (including local field effects in RPA (Hartree))

in the OUTCAR.
- The Born effective charge tensors ( Z i j ∗ Z_{ij}^{*} Zij)
Roughly speaking, the Born effective tensors provide a measure of how much charge effectively moves with an atom when you displace it. For a definition see the article on Berry phases and finite electric fields. For LEPSILON=.TRUE., the Born effective charge tensors are written near the end of the OUTCAR file.
Look for

BORN EFFECTIVE CHARGES (in e, cummulative output)

Mind: you will find this entry only if LRPA=.FALSE. (default), since the Born-effective charges in the RPA tend to be nonsensical.
- The LPEAD-tag
As an alternative to solving a linear Sternheimer equation (Eq. 32 of [1]), one may compute ∣ ∇ k μ ~ n k ⟩ \mathinner{|\nabla_{k}\tilde{\mu }_{nk}\rangle} kμ~nkfrom finite differences by specifying

LPEAD=.TRUE.

in the INCAR file. The derivative of the cell-periodic part of the wave function w.r.t. the Bloch vector is then computed by means of a fourth-order finite difference stencil, in the spirit of Eqs. 96 and 97 of [2]. The results of the calculation of static dielectric properties by means of LEPSILON=.TRUE. tend to converge more rapidly w.r.t. k-point sampling with LPEAD=.TRUE.
Rerun the example with

ISMEAR =  0
SIGMA  =  0.01
EDIFF  = 1.E-8
   
## to get the Born effective charges
## and the macroscopic dielectric tensor
LEPSILON = .TRUE.
LPEAD = .TRUE.

This will allow for a clean comparison with the next topic.

2.2 Response to finite electric fields

The second way one may compute the static dielectric properties is from self-consistent response of the system to a finite electric field.[3]

  • INCAR
ISMEAR =  0
SIGMA  =  0.01
EDIFF  = 1.E-8

LCALCEPS = .TRUE.

2.3 Ionic contributions to the static dielectric properties

To obtain the ionic contributions to the static dielectric properties one needs to compute the force-constant matrices (Hessian of the total energy w.r.t. the ionic positions) and internal strain tensors (second derivative of the total energy w.r.t. strain fields and ionic postions). These properties may be obtained from finite differences (IBRION=5 or 6) or from perturbation theory (IBRION=7 or 8). Try the following

  • INCAR
ISMEAR =  0
SIGMA  =  0.01
EDIFF  = 1.E-8
   
## to get the Born effective charges
## and the macroscopic dielectric tensor
LEPSILON = .TRUE.
LPEAD = .TRUE.
    
## to get the ionic contribution
## to the macroscopic dielectric tensor
IBRION = 8

and search for

MACROSCOPIC STATIC DIELECTRIC TENSOR IONIC CONTRIBUTION
ELASTIC MODULI IONIC CONTR (kBar)
PIEZOELECTRIC TENSOR IONIC CONTR  for field in x, y, z        (C/m^2)

in the OUTCAR file.

3. Frequency dependent dielectric response

Frequency dependent dielectric functions may be computed at various levels of approximation:

  1. In the independent-particle approximation.
  2. Including local field effects in the random-phase-approximation.
  3. Including local field effects in DFT.

Whatever we may choose to do afterwards in terms of dielectric response calculations, we have to start with a standard DFT (or hybrid functional) calculation

  • INCAR (see INCAR.DFT)
ISMEAR =  0
SIGMA  =  0.01
EDIFF  = 1.E-8
  • KPOINTS (see KPOINTS.6)
6x6x6
 0
G
 6 6 6
 0 0 0

Mind: keep the WAVECAR file, you’re going to need it in the following.

3.1 The independent-particle picture

To compute the frequency dependent dielectric function in the independent-particle (IP) picture we restart from the WAVECAR of the previous run, with the following INCAR

  • INCAR (see INCAR.LOPTICS)
ALGO = Exact
NBANDS  = 64
LOPTICS = .TRUE. ; CSHIFT = 0.100
NEDOS = 2000
   
## and you might try with the following
#LPEAD = .TRUE.
   
ISMEAR =  0
SIGMA  =  0.01
EDIFF  = 1.E-8

The frequency dependent dielectric functions is written to the OUTCAR file. Search for

frequency dependent IMAGINARY DIELECTRIC FUNCTION (independent particle, no local field effects)

and

 frequency dependent      REAL DIELECTRIC FUNCTION (independent particle, no local field effects)

To visualize the real and imaginary parts of the frequency dependent dielectric function you may use p4vasp

p4v vasprun.xml

or run the following bash-script (plotoptics2)

awk 'BEGIN{i=1} /imag/,\
                /\/imag/ \
                 {a[i]=$2 ; b[i]=$3 ; i=i+1} \
     END{for (j=12;j<i-3;j++) print a[j],b[j]}' vasprun.xml > imag.dat

awk 'BEGIN{i=1} /real/,\
                /\/real/ \
                 {a[i]=$2 ; b[i]=$3 ; i=i+1} \
     END{for (j=12;j<i-3;j++) print a[j],b[j]}' vasprun.xml > real.dat

cat >plotfile<<!
# set term postscript enhanced eps colour lw 2 "Helvetica" 20
# set output "optics.eps"
plot [0:25] "imag.dat" using (\$1):(\$2) w lp, "real.dat" using (\$1):(\$2) w lp
!

gnuplot -persist plotfile
  • LPEAD-tag
    As an alternative to the perturbative expression (Eq. 31 of [1]), one may compute ∣ ∇ k μ ~ n k ⟩ \mathinner{|\nabla_{k}\tilde{\mu }_{nk}\rangle} kμ~nk from finite differences by specifying
LPEAD=.TRUE.

in the INCAR file. The derivative of the cell-periodic part of the wave function w.r.t. the Bloch vector is then computed by means of a fourth-order finite difference stencil, in the spirit of Eqs. 96 and 97 of [2].

Mind: keep the WAVECAR and WAVEDER files, you’re going to need them in the following. You might also want to keep a copy of the vasprun.xml.

cp vasprun.xml vasprun_loptics.xml

3.2 Including local field effects

To determine the frequency dependent dielectric function including local field effects one needs the WAVECAR and WAVEDER files from the previous calculation (ALGO=Exact and LOPTICS=.TRUE., and sufficient virtual orbitals), and

  • INCAR (see INCAR.CHI)
# Frequency dependent dielectric tensor with and
# without local field effects in RPA
# N.B.: beware one first has to have done a
# calculation with ALGO=Exact, LOPTICS=.TRUE.
# and a reasonable number of virtual states (see above)
ALGO = CHI
       
# be sure to take the same number of bands as for
# the LOPTICS=.TRUE. calculation, otherwise the
# WAVEDER file is not read correctly
NBANDS = 64
   
ISMEAR =  0
SIGMA  =  0.01
EDIFF  = 1.E-8
     
LWAVE = .FALSE.
LCHARG= .FALSE.

Information concerning the dielectric function in the independent-particle picture is written after the line

HEAD OF MICROSCOPIC DIELECTRIC TENSOR (INDEPENDENT PARTICLE)

in the OUTCAR file.
Per default, for ALGO=CHI, local field effects are included at the level of the RPA (LRPA=.TRUE.), i.e., limited to Hartree contributions only.
See the information after

INVERSE MACROSCOPIC DIELECTRIC TENSOR (including local field effects in RPA (Hartree))

in the OUTCAR file.
To include local field effects beyond the RPA, i.e., contributions from DFT exchange and correlation, one has to specify

LRPA=.FALSE.

in the INCAR file.
In this case look at the output after

INVERSE MACROSCOPIC DIELECTRIC TENSOR (test charge-test charge, local field effects in DFT)

in the OUTCAR file.

The following bash-script (plotchi) uses awk to extract the frequency dependent dielectric constant, both in the independent-particle picture as well as including local field effects (either in DFT or in the RPA) and plots the real and imaginary components using gnuplot:

awk 'BEGIN{i=1} /HEAD OF MICRO/,\
                /XI_LOCAL/ \
                 {if ($4=="dielectric") {a[i]=$1 ; b[i]=$2 ; c[i]=$3 ; i=i+1}} \
     END{for (j=1;j<i;j++) print a[j],b[j],c[j]}' OUTCAR > chi0.dat

awk 'BEGIN{i=1} /INVERSE MACRO/,\
                /XI_TO_W/ \
                 {if ($4=="dielectric") {a[i]=$1 ; b[i]=$2 ; c[i]=$3 ; i=i+1}} \
     END{for (j=1;j<i;j++) print a[j],b[j],c[j]}' OUTCAR > chi.dat
cat >plotfile<<!
# set term postscript enhanced eps colour lw 2 "Helvetica" 20
# set output "optics.eps"

plot "chi0.dat" using (\$1):(\$2)  w lp lt -1 lw 2 pt 4 title "chi0 real", \
     "chi0.dat" using (\$1):(-\$3) w lp lt  0 lw 2 pt 4 title "chi0 imag", \
     "chi.dat"  using (\$1):(\$2)  w lp lt  1 lw 2 pt 2 title "chi  real", \
     "chi.dat"  using (\$1):(-\$3) w lp lt  0 lw 2 pt 2 lc 1 title "chi  imag"
!

gnuplot -persist plotfile

If you have kept a copy of the vasprun.xml of the LOPTICS=.TRUE. run (e.g., vasprun_loptics.xml), you might execute plotall to compare the dielectric functions computed with LOPTICS=.TRUE. and ALGO=CHI.

vasprun_LOPTICS=vasprun_loptics.xml
OUTCAR_CHI=OUTCAR

awk 'BEGIN{i=1} /imag/,\
                /\/imag/ \
                 {a[i]=$2 ; b[i]=$3 ; i=i+1} \
     END{for (j=12;j<i-3;j++) print a[j],b[j]}' $vasprun_LOPTICS > imag.dat

awk 'BEGIN{i=1} /real/,\
                /\/real/ \
                 {a[i]=$2 ; b[i]=$3 ; i=i+1} \
     END{for (j=12;j<i-3;j++) print a[j],b[j]}' $vasprun_LOPTICS > real.dat

awk 'BEGIN{i=1} /HEAD OF MICRO/,\
                /XI_LOCAL/ \
                 {if ($4=="dielectric") {a[i]=$1 ; b[i]=$2 ; c[i]=$3 ; i=i+1}} \
     END{for (j=1;j<i;j++) print a[j],b[j],c[j]}' $OUTCAR_CHI > chi0.dat

awk 'BEGIN{i=1} /INVERSE MACRO/,\
                /XI_TO_W/ \
                 {if ($4=="dielectric") {a[i]=$1 ; b[i]=$2 ; c[i]=$3 ; i=i+1}} \
     END{for (j=1;j<i;j++) print a[j],b[j],c[j]}' $OUTCAR_CHI > chi.dat

cat >plotfile<<!
# set term postscript enhanced eps colour lw 2 "Helvetica" 20
# set output "optics.eps"

plot "chi0.dat" using (\$1):(\$2)  w lp lt -1 lw 2 pt 4 title "chi0 real", \
     "chi0.dat" using (\$1):(-\$3) w lp lt  0 lw 2 pt 4 title "chi0 imag", \
     "chi.dat"  using (\$1):(\$2)  w lp lt  1 lw 2 pt 2 title "chi  real", \
     "chi.dat"  using (\$1):(-\$3) w lp lt  0 lw 2 pt 2 lc 1 title "chi  imag", \
     "real.dat"  using (\$1):(\$2) w l lt -1  title "optics  real", \
     "imag.dat"  using (\$1):(-\$2) w l lt  0 lc -1 title "optics  imag"
!

gnuplot -persist plotfile

Why are the dielectric functions in independent-particle picture from the LOPTICS=.TRUE. and the ALGO=CHI calculations different?
Hints:

  • What CSHIFT is used in the ALGO=CHI calculation?
    Try redoing the LOPTICS=.TRUE. calculation with the same CSHIFT as VASP chose for the ALGO=CHI calculation (see INCAR.LOPTICS2):
CSHIFT=0.466
  • Redo the ALGO=CHI calculation with LSPECTRAL=.FALSE. in the ALGO=CHI calculation (see INCAR.CHI2).and compare the dielectric functions again.
  • The sample output (using a mesh for the k points) should look like the following:
    在这里插入图片描述
### VASP在高压条件下的设置与应用 VASP 是一种广泛应用于材料科学的第一性原理计算工具,其核心基于密度泛函理论 (DFT)[^1]。为了模拟物质在高压环境中的行为,VASP 的输入文件需要经过特定调整来反映外部压力的影响。 #### 输入文件的配置 在高压条件下进行 VASP 计算时,主要涉及以下几个方面的调整: 1. **POSCAR 文件** POSCAR 定义了晶体结构及其晶格参数。对于高压计算,通常通过缩小晶格常数 \(a\) 来施加虚拟的压力。可以通过以下方式实现: - 手动修改晶格常数的比例因子(即第一行数值),使其小于标准状态下的值。 - 使用 `ISIF` 参数控制体积优化过程。例如,当 `ISIF=3` 或更高时,允许晶格矢量和原子位置同时弛豫[^1]。 2. **INCAR 文件的关键参数** 下面列出了几个重要的 INCAR 参数用于高压计算: - **IBRION**: 控制离子松弛算法。推荐使用 `IBRION=2`(共轭梯度法)或 `IBRION=3`(快速最小化法)。 \[ IBRION = 2 \text{ or } 3 \][^1] - **EDIFF**: 收敛精度阈值。建议将其设为较小值以提高准确性,例如 \(10^{-6}\) eV。 \[ EDIFF = 1e-6 \][^1] - **PREC**: 精度选项。选择高精度模式 (`PREC=Accurate`) 可获得更精确的结果。 - **ISMEAR 和 SIGMA**: 对于金属体系,采用费米分布平滑技术;而对于绝缘体,则可选用 Gaussian 平滑方法。 \[ ISMEAR = 0; SIGMA = 0.05 \] - **LREAL**: 关闭投影实空间修正以减少误差。 \[ LREAL = .FALSE. \][^1] - **KSPACING/KPAR/NPAR**: 如果启用自动 k-point 生成功能,需注意网格间距的选择应适配更高的能量分辨率需求。此外,在大规模并行环境下合理分配任务也很重要。 3. **KPOINTS 文件** K-points 密度直接影响布里渊区积分的质量以及最终得到的状态方程曲线形状。因此,在研究极端条件下的物态变化时,应当适当增加采样点数目或者改用更加精细的手工定义路径。 4. **POTCAR 文件** POTCAR 包含赝势信息,确保所选元素对应的 PAW 数据集适用于当前工作范围内的所有可能构型至关重要。某些特殊情况下甚至还需要考虑半核壳层填充效应等问题。 #### 输出数据解读 完成上述设定之后运行程序即可获取一系列关于系统响应的信息,其中最重要的是总自由能随外压改变的趋势图谱。通过对这些数据拟合可以获得诸如平衡体积、弹性模量等宏观性质指标[^1]。 ```python import numpy as np from scipy.optimize import curve_fit def birch_murnaghan(V, E0, B0, BP, V0): """ Birch-Murnaghan equation of state function. Parameters: V : Volume array E0 : Ground-state energy at equilibrium volume B0 : Bulk modulus at equilibrium volume BP : Pressure derivative of bulk modulus V0 : Equilibrium volume Returns: Energy values corresponding to given volumes under BM fit model. """ eta = (V / V0)**(1./3.) return E0 + 9.*B0*V0/16.*(eta**(-2.)*(BP*(eta**(2.)-1.)+1.)-(BP-1.)*np.log(eta)) # Example usage with hypothetical data points extracted from OUTCAR files... volumes = [...] # List containing calculated cell volumes per atom in Angstrom³ units energies = [...] # Corresponding total energies obtained after each SCF cycle finished successfully popt, pcov = curve_fit(birch_murnaghan, volumes, energies) print(f"Fitted parameters:\nE₀={popt[0]},\tB₀={popt[1]} GPa,\tB'={popt[2]},\tV₀={popt[3]} ų") ``` 以上代码片段展示了如何利用 Python 实现 Birch–Murnaghan 方程式拟合法分析所得实验成果,并从中提取关键热力学参量。 ---
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值