VASP

VASP是使用最为广泛的第一性原理计算软件。

环境:CentOS-7-x86_64-Minimal,Intel® Parallel Studio XE 2015。

以vasp5.4.4为例。下载地址1下载地址2下载地址3下载地址4

修改makefile,makefile.include,src/constr_cell_relax.F,运行,

makefile.include如下,

# Precompiler options
CPP_OPTIONS= -DHOST=\"LinuxIFC\"\
             -DMPI -DMPI_BLOCK=8000 \
             -Duse_collective \
             -DscaLAPACK \
             -DCACHE_SIZE=4000 \
             -Davoidalloc \
             -Duse_bse_te \
             -Dtbdyn \
             -Duse_shmem

CPP        = fpp -f_com=no -free -w0  $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)

FC         = mpiifort
FCL        = mpiifort -mkl=sequential -lstdc++

FREE       = -free -names lowercase

FFLAGS     = -assume byterecl -w -heap-arrays 64
OFLAG      = -O2
OFLAG_IN   = $(OFLAG)
DEBUG      = -O0

MKL_PATH   = $(MKLROOT)/lib/intel64
BLAS       =
LAPACK     =
BLACS      = -lmkl_blacs_intelmpi_lp64
SCALAPACK  = $(MKL_PATH)/libmkl_scalapack_lp64.a $(BLACS)

OBJECTS    = fftmpiw.o fftmpi_map.o fft3dlib.o fftw3d.o

INCS       =-I$(MKLROOT)/include/fftw

LLIBS      = $(SCALAPACK) $(LAPACK) $(BLAS)


OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.o
OBJECTS_O2 += fft3dlib.o

# For what used to be vasp.5.lib
CPP_LIB    = $(CPP)
FC_LIB     = $(FC)
CC_LIB     = icc
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB   = $(FREE)

OBJECTS_LIB= linpack_double.o getshmem.o

# For the parser library
CXX_PARS   = icpc

LIBS       += parser
LLIBS      += -Lparser -lparser -lstdc++

# Normally no need to change this
SRCDIR     = ../../src
BINDIR     = ../../bin

#================================================
# GPU Stuff

CPP_GPU    = -DCUDA_GPU -DRPROMU_CPROJ_OVERLAP -DUSE_PINNED_MEMORY -DCUFFT_MIN=28 -UscaLAPACK

OBJECTS_GPU = fftmpiw.o fftmpi_map.o fft3dlib.o fftw3d_gpu.o fftmpiw_gpu.o

CC         = icc
CXX        = icpc
CFLAGS     = -fPIC -DADD_ -Wall -openmp -DMAGMA_WITH_MKL -DMAGMA_SETAFFINITY -DGPUSHMEM=300 -DHAVE_CUBLAS

CUDA_ROOT  ?= /usr/local/cuda/
NVCC       := $(CUDA_ROOT)/bin/nvcc -ccbin=icc
CUDA_LIB   := -L$(CUDA_ROOT)/lib64 -lnvToolsExt -lcudart -lcuda -lcufft -lcublas

GENCODE_ARCH    := -gencode=arch=compute_30,code=\"sm_30,compute_30\" \
                   -gencode=arch=compute_35,code=\"sm_35,compute_35\" \
                   -gencode=arch=compute_60,code=\"sm_60,compute_60\"

MPI_INC    = $(I_MPI_ROOT)/include64/
source /opt/longrun/intel2017/parallel_studio_xe_2017.5.061/psxevars.sh
chmod -R 755 ./* && make all #不要使用make all -j *

修改.bashrc,

#vasp
export PATH=$PATH:/root/soft/vasp.5.4.4/bin
ulimit -s unlimited

运行任务,以Si为例,

ulimit -s unlimited #与FFLAGS = -heap-arrays 64等价
mpirun -np 2 vasp_std > log
mpirun -np 2 vasp_std > log & #后台运行

参考VASP的最简单的安装方法VASP 5.4.1+VTST编译安装Intel Parallel Studio XE 编译VASPVASP编译安装教程vasp成功安装后运行时出现Segmentation fault (signal 11)错误,求指教


VASPsol下载

1 将VASPsol/src/solvation.F覆盖添加到vasp.5.4.4/src;

2 修改makefile.include中CPP_OPTIONS,添加-Dsol_compat,如下,

# Precompiler options
CPP_OPTIONS= -DHOST=\"LinuxIFC\"\
             -DMPI -DMPI_BLOCK=8000 \
             -Duse_collective \
             -DscaLAPACK \
             -DCACHE_SIZE=4000 \
             -Davoidalloc \
             -Duse_bse_te \
             -Dtbdyn \
             -Duse_shmem \
             -Dsol_compat

VTST下载

包含vtstcode.tgz和vtstscripts.tgz,软件替换只需vtstcode.tgz,vtstscripts.tgz也可以从这里下载最新版。

1 修改src/main.F文件,

CALL CHAIN_FORCE(T_INFO%NIONS,DYN%POSION,TOTEN,TIFOR, &
     LATT_CUR%A,LATT_CUR%B,IO%IU6)

替换为

CALL CHAIN_FORCE(T_INFO%NIONS,DYN%POSION,TOTEN,TIFOR, &
     TSIF,LATT_CUR%A,LATT_CUR%B,IO%IU6)

2 在src/.objects中的chain.o前面加,

bfgs.o dynmat.o  instanton.o  lbfgs.o sd.o   cg.o dimer.o bbm.o \
fire.o lanczos.o neb.o  qm.o opt.o \

参考VTST TOOLs Installation编译vasp5.4.1+VTST


Wannier90下载

cp ./config/make.inc.ifort ./make.inc

修改make.inc,

LIBDIR = /opt/longrun/intel2017/compilers_and_libraries_2017.5.239/linux/mkl/lib/intel64_lin
make wannier lib tests

vasp5.4.4与wannier90联用,需要修改makefile.include,

# Precompiler options
CPP_OPTIONS= -DHOST=\"LinuxIFC\"\
             -DMPI -DMPI_BLOCK=8000 \
             -Duse_collective \
             -DscaLAPACK \
             -DCACHE_SIZE=4000 \
             -Davoidalloc \
             -Duse_bse_te \
             -Dtbdyn \
             -Duse_shmem \
             -DVASP2WANNIER90

CPP        = fpp -f_com=no -free -w0  $*$(FUFFIX) $*$(SUFFIX) $(CPP_OPTIONS)

FC         = mpiifort
FCL        = mpiifort -mkl=sequential -lstdc++

FREE       = -free -names lowercase

FFLAGS     = -assume byterecl -w
OFLAG      = -O2 -xhost
OFLAG_IN   = $(OFLAG)
DEBUG      = -O0

MKLROOT    =/opt/longrun/intel2017/compilers_and_libraries_2017.5.239/linux/mkl
MKL_PATH   = $(MKLROOT)/lib/intel64
BLAS       = $(MKL_PATH)/libmkl_blas95_lp64.a
LAPACK     = $(MKL_PATH)/libmkl_lapack95_lp64.a
BLACS      = -lmkl_blacs_intelmpi_lp64
SCALAPACK  = $(MKL_PATH)/libmkl_scalapack_lp64.a $(BLACS)

OBJECTS    = fftmpiw.o fftmpi_map.o fft3dlib.o fftw3d.o

INCS       =-I$(MKLROOT)/include/fftw

LLIBS      = $(SCALAPACK) $(LAPACK) $(BLAS)
LLIBS      += /opt/longrun/wannier90_3.0.0/libwannier.a


OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.o
OBJECTS_O2 += fft3dlib.o

# For what used to be vasp.5.lib
CPP_LIB    = $(CPP)
FC_LIB     = $(FC)
CC_LIB     = icc
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB   = $(FREE)

OBJECTS_LIB= linpack_double.o getshmem.o

# For the parser library
CXX_PARS   = icpc

LIBS       += parser
LLIBS      += -Lparser -lparser -lstdc++

# Normally no need to change this
SRCDIR     = ../../src
BINDIR     = ../../bin

#================================================
# GPU Stuff

CPP_GPU    = -DCUDA_GPU -DRPROMU_CPROJ_OVERLAP -DUSE_PINNED_MEMORY -DCUFFT_MIN=28 -UscaLAPACK

OBJECTS_GPU = fftmpiw.o fftmpi_map.o fft3dlib.o fftw3d_gpu.o fftmpiw_gpu.o

CC         = icc
CXX        = icpc
CFLAGS     = -fPIC -DADD_ -Wall -openmp -DMAGMA_WITH_MKL -DMAGMA_SETAFFINITY -DGPUSHMEM=300 -DHAVE_CUBLAS

CUDA_ROOT  ?= /usr/local/cuda/
NVCC       := $(CUDA_ROOT)/bin/nvcc -ccbin=icc
CUDA_LIB   := -L$(CUDA_ROOT)/lib64 -lnvToolsExt -lcudart -lcuda -lcufft -lcublas

GENCODE_ARCH    := -gencode=arch=compute_30,code=\"sm_30,compute_30\" \
                   -gencode=arch=compute_35,code=\"sm_35,compute_35\" \
                   -gencode=arch=compute_60,code=\"sm_60,compute_60\"

MPI_INC    = $(I_MPI_ROOT)/include64/

参考wannier90/README.installVASP Compilation


参考教程如下

世事如棋

Recommended PAW potentials for DFT calculations using vasp.5.2

VASP Category:Examples

VASPy

Learn VASP The Hard Way

Chem_peng

VASPKIT

VTST-Tools

vtstscripts

Mabinogiysk/VASP-script Github

LABORATORIO DE FISICA ATOMICA MOLECULAR Y APLICADA

Tips for vasp users

VASP MANUAL

第一原理計算入門

RKS web

VASPで第一原理計算

Modeling materials using density functional theory

LiuGaoyong/VASP-Compile

VASP-Makefiles

cndaqiang博客

Duk-Hyun CHOE

Duk-Hyun CHOE2

WMD-group/INCAR Github

使用vasp进行分子动力学模拟

Workshop2014

Advice for New Students on Getting Started With DFT

ericwwelch314/VASP-DFT-Tutorial Github

用VASP进行Partial Charge分析实例

~wschnei1/courses/CBE_547/Lectures

VASP Workshop-Hartwin Peelaers & Darshana Wickramaratne

vasp-workshop/tutorials

在 VASP(PBE) 计算中如何优雅地踩坑?

Sergey Matveev (installation, scripts), Dmitry Aksenov (guidelines, scripts)

Ionizing's Blog

我的vasp学习笔记

HSE06 band structure calculations with SoC

Hirschfeld-I Analysis

Chemical bonding

晶格振动的红外吸收和Raman散射

思想家公社的门口

Phonon Calculations via VASP

VASP引用文献

生成能计算-费米维基

VASP Tools-NSC