36415
当前位置: 首页   >  组内活动   >  VASPsol及CP-VASP安装过程
VASPsol及CP-VASP安装过程
发布时间:2025-06-26

VASPsol及CP-VASP安装过程

马祖驹

2025.6.26


1. 确保VASP6.3.0可以正常安装

假设目录:/opt/pub/softwares/VASP-6.3.0-sol/vasp6.3.0/vasp.6.3.0/
(1)module load intel mpi
(2)make veryclean
(3)make all


2. VASPsol获取和安装

(1)git clone https://github.com/henniggroup/VASPsol.git
通过 Git clone获得vaspsol源码:假设放置在vasp安装目录:/opt/pub/softwares/VASP-6.3.0-sol/vasp6.3.0/vasp.6.3.0/vaspsol/VASPsol
(2)cp vaspsol/VASPsol/src/solvation.F ./src/
覆盖原来的solvation.F
(3)cp vaspsol/VASPsol/patches/pbz_patch_610 ./src/
pbz_patch_610拷贝到vasp安装目录下的src下
(4)vi ./src/.objects
确保solvation.o 出现在 pot.o 之前,这边看到确实在前面
(5)vi makefile.include
CPP_OPTIONS 一行中加入-Dsol_compat,可以加在选项最后,加完如下:
CPP_OPTIONS= -DHOST=\"LinuxIFC\"\
             -DMPI -DMPI_BLOCK=8000 -Duse_collective \
             -DscaLAPACK \
             -DCACHE_SIZE=4000 \
             -Davoidalloc \
             -Dvasp6 \
             -Duse_bse_te \
             -Dtbdyn \
             -Dfock_dblbuf \
             -Dsol_compat
(6)到vasp的src目录下,运行patch -p0 < pbz_patch_610
(7)回到上一个目录,进行vasp编译和安装
(8)make veryclean
(9)make all


3. CP-VASP获取及安装

(1)另外拷贝一个vasp6.3.0的安装文件,cp -r VASP-6.3.0-sol/ VASP-6.3.0-sol-cp

(2)获取cp-vasp文件

获取路径:https://docs.google.com/forms/d/e/1FAIpQLSdjinABLY26jora50jedL5X6bj5Pc7BTeys5pmclstlWs46Lw/viewform

很快,一天之内获得,得到两个补丁文件:cp-vaspsol.patch及cp-vaspsol++.patch

(2)cp cp-vaspsol.patch src/

cp-vaspsol.patch拷贝到vasp安装路径下的/src/目录下

(3) cd src

(4)patch -p0 < cp-vaspsol.patch

显示如下:表示修改了几个文件

        patching file main.F

        Hunk #1 succeeded at 213 with fuzz 2 (offset -6 lines).

        Hunk #2 succeeded at 430 (offset -8 lines).

        Hunk #3 succeeded at 691 (offset -27 lines).

        Hunk #4 succeeded at 2714 (offset -109 lines).

        Hunk #5 succeeded at 3096 with fuzz 1 (offset -111 lines).

        Hunk #6 succeeded at 3166 (offset -124 lines).

        Hunk #7 succeeded at 3771 (offset -135 lines).

        Hunk #8 succeeded at 3938 with fuzz 1 (offset -143 lines).

        Hunk #9 succeeded at 4154 (offset -140 lines).

        Hunk #10 succeeded at 4361 (offset -146 lines).

        Hunk #11 succeeded at 5616 with fuzz 1 (offset -172 lines).

        patching file reader.F

        Hunk #2 succeeded at 87 (offset -1 lines).

        Hunk #3 succeeded at 843 (offset -21 lines).

        patching file pot.F

        Hunk #1 succeeded at 363 (offset -1 lines).

        patching file solvation.F

(5)回到上级目录,运行make veryclean和make all进行VASP安装


4. 创建module文件,方便调用

(1)通过第二步安装,获得了vasp6.3.0-sol程序,

路径如下:/opt/pub/softwares/VASP-6.3.0-sol/vasp6.3.0/vasp.6.3.0

(2)到module 文件路径:/opt/pub/modulefiles/softwares 

(3) cp 6.3.0-20.lua 6.3.0-sol.lua

(4)修改 6.3.0-sol.lua文件里面的路径为:/opt/pub/softwares/VASP-6.3.0-sol/vasp6.3.0/vasp.6.3.0/bin/

(5)module refresh

(6)检查:module avail

(7)同理,创建vasp6.3.0-sol-cp文件,方便后续调用。


5. 调用vasp6.3.0-sol-cp

(1)在提交作业文件中,修改原来的module load VASP/6.3.0改为module load VASP/6.3.0-sol-cp


6. 使用cp-vasp和vaspsol需要引用的文献

(1)cp-vasp

  1. Zhao, X.; Liu, Y. Origin of Selective Production of Hydrogen Peroxide by Electrochemical Oxygen Reduction. Journal of the American Chemical Society 2021, 143 (25), 9423-9428.

  2. Yu, S.; Levell, Z.; Jiang, Z.; Zhao, X.; Liu, Y. What Is the Rate-Limiting Step of Oxygen Reduction Reaction on Fe–N–C Catalysts? Journal of the American Chemical Society 2023, 145 (46), 25352-25356.

(2)vaspsol

  • Implicit solvation model for density-functional study of nanocrystal surfaces and reaction pathways. K. Mathew, R. Sundararaman, K. Letchworth-Weaver, T. A. Arias, and R. G. Hennig, J. Chem. Phys. 140, 084106 (2014), [doi:10.1063/1.4865107] (https://doi.org/10.1063/1.4865107).

  • Implicit self-consistent electrolyte model in plane-wave density-functional theory. K. Mathew, V. S. C. Kolluru, S. Mula, S. N. Steinmann, and R. G. Hennig, J. Chem. Phys. 151, 234101 (2019), [doi:10.1063/1.5132354] (https://doi.org/10.1063/1.5132354).