-
你需要vasp最基本的INCAR,POSCAR(或者你有自己的.cif可以用pymatgen或者VESTA转换成POSCAR), POTCAR, 和KPOINTS文件。两个不同的INCAR放在两个不同的文件夹。整个过程有两大步骤。原作者的范例,两个文件夹是一个套一个的,其实没什么关系可以平行放
-
第一大步计算phonon:1)创建一个文件夹用作phonon计算,暂且命名phonon
-
$ mkdir phonon
$ cd phonon
2)放入POSCAR,POTCAR,KPOINTS,和第一个INCAR(这个是原作者的INCAR)。两个INCAR之间的主要区别在这几行(每一个参数代表算什么,强烈推荐看vaspwiki,最好的教科书):
-
# 在phonon里面得把这几行 comment in
! phonons
ICHAIN = 1 ! Run the dynamical matrix code
! IMAGES = M ! Number of parallel images, if desired as in step 2 above; otherwise, do not add.
NSW = 25 ! (DOF/M)+1 Number of ionic steps
IBRION = 3 ! Tell VASP to run dynamics,
POTIM = 0.0 ! with a time step of zero (ie, do nothing)
ISYM = 0 ! Make sure that symmetry is off,
EDIFFG = -1E-10 ! and that vasp does not quit due to low forces
#然后在第二大步的时候把这几行 comment out,像这样
! phonons
!ICHAIN = 1 ! Run the dynamical matrix code
! IMAGES = M ! Number of parallel images, if desired as in step 2 above; otherwise, do not add.
!NSW = 25 ! (DOF/M)+1 Number of ionic steps
!IBRION = 3 ! Tell VASP to run dynamics,
!POTIM = 0.0 ! with a time step of zero (ie, do nothing)
!ISYM = 0 ! Make sure that symmetry is off,
!EDIFFG = -1E-10 ! and that vasp does not quit due to low forces
#那个IMAGES是管平行计算的,只在单机电脑不是HPC玩一下的同学可以不用管
3)用VTST里面的dymselsph.pl码计算DISPLACECAR:
-
$ perl <path to>/vtstscripts/dymselsph.pl POSCAR 8 3 0.001 #<path to>自己改成到.pl文件# 的地方就是了
# 其中8是以第几个原子为中心
# 3是半径范围可以自己调,目的是是让这个code找到在这个半径范围找到所有原子
# 0.001是resolution <调过这个参数,对最后的光谱好像没有很大影响,大神可以留留言>
输出如下:
-
----------------------------------------------------------------------
Using 1 central atom
Central Coordinates: 0.6666669999999968 0.3333330000000032 0.3506900000000002
Central atom 1: 0.6666669999999968 0.3333330000000032 0.3506900000000002
----------------------------------------------------------------------
8 atoms were found within a radius of 3.87 of atom 8,
leading to 24 degrees of freedom selected.
----------------------------------------------------------------------
?4)mark下这个degrees of freedom(DOF), 去把INCAR里面的NSW改了。根据要求例如DOF=24,不平行运算,那么NSW就是DOF+1,NSW=25
?5)然后就是运行vasp:
-
$ mpirun -np 4 vasp_vtst_std
6)结束以后用VTST script里面的dymmatrix.py,创造freq.dat, modes_sqrt_amu.dat force_constants.dat effective_masses.dat...
-
$ python <path to>/vtstscripts/dymmatrix.py DISPLACECAR OUTCAR
-
然后是第二大步:1)把第一步的结果 *.dat和CONTCAR 复制到另外一个文件夹:
-
$ cp *dat ../ && cp CONTCAR ../POSCAR.phon #在名为phonon那个folder里运行
# !!!!注意原作者的.phon是前一步的结果, 根据知乎大神
?2) cd到另外一个文件夹
-
3)像第一步里面comment out第一步的东西和把LEPSILON = .TRUE.,这样vasp就会算static dielectric matrix, 改完如下(抄作业的同学把INCAR-outside改名为INCAR就好)
-
! phonons
!ICHAIN = 1 ! Run the dynamical matrix code
! IMAGES = M ! Number of parallel images, if desired as in step 2 above; otherwise, do not add.
!NSW = 25 ! (DOF/M)+1 Number of ionic steps
!IBRION = 3 ! Tell VASP to run dynamics,
!POTIM = 0.0 ! with a time step of zero (ie, do nothing)
!ISYM = 0 ! Make sure that symmetry is off,
!EDIFFG = -1E-10 ! and that vasp does not quit due to low forces
LEPSILON=.TRUE.
ISYM=0
4) 打开freq.dat, 那些标着1的都是振模的虚部,mark一下有多少虚部和多少实部,然后去no_scheduler.sh或者其他用HPC slurm交作业的到.slurm文件里改那个VASP_RAMAN_PARAMS参数
-
export VASP_RAMAN_PARAMS='4_24_2_0.01'
# 抄作业的同学看我的no_scheduler.sh里面
# 4可以换成freq.dat里面的虚部
# 24换成最后一个振膜,例如有24行
# 2不能改,原作写到只支持second derivative
# 0.01是resolution,可选改
5)最后就是交作业
-
# 记得根据你自己的电脑改 export VASP_RAMAN_RUN='mpirun -np X vasp_vtst_std'里的X
$ bash no_scheduler.sh
结果在vasp_raman.dat里,计算的是峰值和位置,如果要把它变得像光谱一点?
6)plot光谱就参照我的gnuplot.sh或者原作者另外一个文件夹里的broaden.py加上个lorentzian(做实验的知道raman光谱一般用lorentzian来fit而不是gaussian)
-
大功告成!