VASP输入出输出文件
VASP官网给出的input和output内容:
运行VASP所必须的至少4个文件
VASP basically needs 4 input files for standard production runs:
1. INCAR: The default values set by VASP itself are a clever choice to do standard calculations. These standard settings can be modified to specify:
- What do you want to do? (scf calculation, DOS, dielectric properties …)
- You can give parameters to fulfill your requirements concerning required precision, requested convergence, calculation time …
2. POSCAR: The POSCAR file contains the information on the structure.
- A simple POSCAR file may look like this:
- The description of each line is given as follows:
1: Header (comment).
2: Overall scaling constant.
3-6: Bravais matrix.
4: Name(s) of the atom(s).
5: Number of the atoms (of each atom type).
6: (optional: selective dynamics).
7: Specifies which coordinate system is used (“cartesian” or “direct”).
8-x: Positions of the atoms.
3. KPOINTS: The KPOINTS file determines the sampling of the 1st Brillouin zone.
- A typical KPOINTS file:
The description of each line is given as follows:
1: Header (comment).
2: Specifies the k mesh generation type. : automatic generation scheme.
3: Gamma-centered (or Monkhorst-Pack) grid.
4: Number of subdivisions in each direction.
5: Optional shift of the mesh.
4. POTCAR: The POTCAR file contains the relevant information concerning the pseudo potentials that are necessary to run the calculation.
- Data that was required for generating the pseudo potentials.
- Number of valence electrons.
- Atomic mass.
- Energy cut-off…
- If the cell contains different atomic species, the corresponding POTCAR files have to be concatenated, in the same order as the atomic species are given in the POSCAR file.
计算完成后的输出文件
通常来讲,只要一个任务计算成功,在提交任务所在的文件夹中均会出现以下内容(除4个输入文件外,其中.sh
文件是提交任务的脚本文件,vasp.log
是计算过程中的log
文件):
1. OUTCAR: The OUTCAR file gives detailed output of a VASP run, including:
- A summary of the used input parameters.
- Information about the electronic steps, KS-eigenvalues.
- Stress tensors.
- Forces on the atoms.
- Local charges and magnetic moments.
- Dielectric properties
- The amount of output written onto the OUTCAR file can be chosen by modifying the NWRITE tag in the INCAR file.
2. CONTCAR: The CONTCAR file gives the updated geometry data at the end of a run:
- Lattice parameter.
- Bravais matrix.
- Ionic positions.
- (Optionally velocities).
- The format of the CONTCAR file is the same as of the POSCAR file, hence it can be used directly for continuation runs after having been copied to the POSCAR file.
3. OSZICAR: The OSZICAR file gives a short summary of the results:
- Chosen SCF algorithm.
- Convergence of the total energy, charge- and spin densities.
- Free energies.
- Magnetic moments of the cell.
4. XDATCAR
- The XDATCAR file contains updated ionic positions of each ionic step.
5. DOSCAR
- The DOSCAR file contains the total and integrated DOS and optionally the local partial DOS.
6. CHGCAR
- The CHGCAR file contains the charges
7. WAVECAR
- The WAVECAR file contains the wave function coefficients. This file can be used to continue from a previous run.
Running VASP should yield the following on vasp.log
.
运行结果中vasp.log
所代表的含义:
OSZICAR or vasp.log | implication |
---|---|
N | Iteration count |
E | Total energy |
dE | Change of total energy |
d eps | Change in the eigenvalues |
ncg | Number of times is evaluated |
rms | Total residual vector |
rms(c) | Charge-density residual vector |
Timing and energy information:
end:
实际练习:金刚石晶胞的结构优化
下载金刚石结构。从晶体结构数据库下载diamond的cif格式结构,推荐使用American mineralogist database或者Materials Project。在American mineralogist database中,搜索框输入diamond,会出现多种文献中报道过的金刚石结构,选择一种下载。这里我们选择1963年报道的结构:
在VESTA中打开,并导出为.vasp格式的文件。随后将.vasp格式重命名为POSCAR文件拷到计算目录中。下载到的结构如如下所示(测量得到的diamnond键长为1.544,结构参数为a=b=c=3.56679 Å):
准备INCAR文件。参考一下设置。具体参数表达的含义后续介绍。
准备KPOINTS和POTCAR。
KPOINTS
参考图示,POTCAR直接将VASP提供的PBE/C/POTCAR
文件拷到计算目录准备计算脚本。不同集群计算脚本有所区别。以广州超算的系统为例,提交任务的文件(文件名
fd.sh
)内容为:1
2
3!/bin/bash
SBATCH -J VASP-relax
yhrun -N 1 -n 24 -p work vasp_std > vasp.log 2>&1提交计算任务。终端输入:
yhbatch -N 1 -p work ./fd.sh
计算完成并收敛后,
vasp.log
文件末尾如果出现以下字样,则表明计算收敛并结束。1
2
3...
search vector abs. value= 0.101E-09
reached required accuracy - stopping structural energy minimisation分析计算结果。使用
cat CONTCAR
命令查看结构优化的结果:
可以看到晶格常数尤由原来的3.56679 Å变成了3.571 Å,这是由于采用了PBE泛函所导致的。通常PBE会高估晶体结构的晶格常数。
至此,金刚石晶体结构的结构优化工作完成,随后所有工作均需要采用结构优化后的结果。即cp CONTCAR POSCAR
以后,POSCAR结构不能再修改。随后其他物理化学性质的计算均采用此结构文件
References
[1] https://cms.mpi.univie.ac.at/vasp/vasp/Files_used_VASP.html
- Blog Link: http://agrh.github.io/2019/07/19/vasp-tutorial-1/
- Copyright Declaration: The author owns the copyright, please indicate the source reproduced.