安装环境
yum -y update
yum -y install wget
yum -y install gcc-c++
yum -y install gcc-gfortran
yum -y install cmake
yum -y install pkgconfig
yum -y groupinstall "Development Tools"
yum -y install gsl-devel
yum -y install openmpi-devel
yum -y install fftw-devel
yum -y install atlas-devel
yum -y install openssl
yum -y install openssl-devel
yum -y install python3
yum -y install SDL-devel
Intel oneAPI 2021
l_BaseKit_p_2021.1.0.2659_offline.sh
l_HPCKit_p_2021.1.0.2684_offline.sh
source /opt/intel/oneapi/setvars.sh
cd /opt/intel/oneapi/mkl/latest/interfaces/fftw3xf
make libintel64
# 生成libfftw3xf_intel.a库文件
find / -name libfftw3xf_intel.a
# 检查是否显示出编译器的版本
ifort -V
编译
cd /opt/app
wget https://github.com/shankar1729/jdftx/archive/refs/tags/v1.6.0.tar.gz
tar zxvf v1.6.0.tar.gz
mkdir -p /opt/app/JDFTx/1.6.0
cd /opt/app/JDFTx/1.6.0
cmake ../../jdftx-1.6.0/jdftx
make -j4
测试
# 软件自带测试
cd /opt/app/JDFTx/1.6.0
make testclean && make test
# 测试实例
./jdftx -i water.in | tee water.out
water.in
# The input file is a list of commands, one per line
# The commands may appear in any order; group them to your liking
# Everything on a line after a # is treated as a comment and ignored
# Whitespace separates words; extra whitespace is ignored
# --------------- Water molecule example ----------------
# Set up the unit cell - each column is a bravais lattice vector in bohrs
# Hence this is a cubic box of side 10 bohr (Note that \ continues lines)
lattice \
10 0 0 \
0 10 0 \
0 0 10
elec-cutoff 20 100 #Plane-wave kinetic energy cutoff for wavefunctions and charge density in Hartrees
# Specify the pseudopotentials (this defines species O and H):
ion-species GBRV/h_pbe.uspp
ion-species GBRV/o_pbe.uspp
# Specify coordinate system and atom positions:
coords-type cartesian #the other option is lattice (suitable for solids)
ion O 0.00 0.00 0.00 0 # The last 0 holds this atom fixed
ion H 0.00 1.13 +1.45 1 # while the 1 allows this one to move
ion H 0.00 1.13 -1.45 1 # during ionic minimization
dump-name water.$VAR #Filename pattern for outputs
dump End Ecomponents ElecDensity #Output energy components and electron density at the end
参考链接
恒电势JDFTx在Centos7虚拟机上的安装
JDFTx教程